do not allow to stop already stopped timesheets (#289)

This commit is contained in:
Kevin Papst
2018-09-01 13:00:30 +02:00
committed by GitHub
parent b1546c0568
commit 62f91f4d38
15 changed files with 294 additions and 68 deletions

View File

@@ -37,11 +37,18 @@ class BaseQueryTest extends TestCase
{
$this->assertEquals(BaseQuery::RESULT_TYPE_PAGER, $sut->getResultType());
$sut->setResultType('foo-bar');
$this->assertEquals(BaseQuery::RESULT_TYPE_PAGER, $sut->getResultType());
$sut->setResultType(BaseQuery::RESULT_TYPE_QUERYBUILDER);
$this->assertEquals(BaseQuery::RESULT_TYPE_QUERYBUILDER, $sut->getResultType());
$sut->setResultType(BaseQuery::RESULT_TYPE_OBJECTS);
$this->assertEquals(BaseQuery::RESULT_TYPE_OBJECTS, $sut->getResultType());
try {
$sut->setResultType('foo-bar');
} catch (\Exception $exception) {
$this->assertInstanceOf(\InvalidArgumentException::class, $exception);
$this->assertEquals('Unsupported query result type', $exception->getMessage());
}
}
protected function assertHiddenEntity(BaseQuery $sut)