Refactored Store.
This commit is contained in:
parent
905d6d41d1
commit
8b5a874789
44 changed files with 397 additions and 424 deletions
|
|
@ -59,11 +59,9 @@ class BuildTest extends \PHPUnit\Framework\TestCase
|
|||
|
||||
$build = new Build();
|
||||
$build->setLog('log');
|
||||
|
||||
self::assertEquals('log', $build->getLog());
|
||||
|
||||
$build->setLog(null);
|
||||
|
||||
self::assertEquals(null, $build->getLog());
|
||||
|
||||
try {
|
||||
|
|
@ -74,6 +72,27 @@ class BuildTest extends \PHPUnit\Framework\TestCase
|
|||
$e->getMessage()
|
||||
);
|
||||
}
|
||||
|
||||
$build->setSource(Build::SOURCE_WEBHOOK_PULL_REQUEST);
|
||||
self::assertEquals(Build::SOURCE_WEBHOOK_PULL_REQUEST, $build->getSource());
|
||||
|
||||
try {
|
||||
$build->setSource('5');
|
||||
} catch (ValidationException $e) {
|
||||
self::assertEquals(
|
||||
'Column "source" must be an integer.',
|
||||
$e->getMessage()
|
||||
);
|
||||
}
|
||||
|
||||
try {
|
||||
$build->setId(null);
|
||||
} catch (ValidationException $e) {
|
||||
self::assertEquals(
|
||||
'Column "id" must not be null.',
|
||||
$e->getMessage()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function testExecute_TestBaseBuildDefaults()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue