Added 'user_id' column to 'build' table (created by)
+ Renamed columns 'created' -> 'create_date', 'started' -> 'start_date' and 'finished' -> 'finish_date' + Code style fixes.
This commit is contained in:
parent
58b23fe89d
commit
4ec6d854c2
29 changed files with 550 additions and 661 deletions
|
|
@ -62,14 +62,14 @@ class BuildServiceTest extends \PHPUnit\Framework\TestCase
|
|||
|
||||
$this->assertEquals(101, $returnValue->getProjectId());
|
||||
$this->assertEquals(Build::STATUS_PENDING, $returnValue->getStatus());
|
||||
$this->assertNull($returnValue->getStarted());
|
||||
$this->assertNull($returnValue->getFinished());
|
||||
$this->assertNull($returnValue->getStartDate());
|
||||
$this->assertNull($returnValue->getFinishDate());
|
||||
$this->assertNull($returnValue->getLog());
|
||||
$this->assertEquals(null, $returnValue->getCommitMessage());
|
||||
$this->assertNull($returnValue->getCommitterEmail());
|
||||
$this->assertEquals(['branches' => []], $returnValue->getExtra());
|
||||
$this->assertEquals('master', $returnValue->getBranch());
|
||||
$this->assertInstanceOf('DateTime', $returnValue->getCreated());
|
||||
$this->assertInstanceOf('DateTime', $returnValue->getCreateDate());
|
||||
$this->assertEquals('', $returnValue->getCommitId());
|
||||
$this->assertEquals(Build::SOURCE_UNKNOWN, $returnValue->getSource());
|
||||
}
|
||||
|
|
@ -142,8 +142,8 @@ class BuildServiceTest extends \PHPUnit\Framework\TestCase
|
|||
$build->setStatus(Build::STATUS_FAILED);
|
||||
$build->setLog('Test');
|
||||
$build->setBranch('example_branch');
|
||||
$build->setStarted(new \DateTime());
|
||||
$build->setFinished(new \DateTime());
|
||||
$build->setStartDate(new \DateTime());
|
||||
$build->setFinishDate(new \DateTime());
|
||||
$build->setCommitMessage('test');
|
||||
$build->setCommitterEmail('test@example.com');
|
||||
$build->setExtra(json_encode(['item1' => 1001]));
|
||||
|
|
@ -157,9 +157,9 @@ class BuildServiceTest extends \PHPUnit\Framework\TestCase
|
|||
$this->assertEquals(Build::STATUS_PENDING, $returnValue->getStatus());
|
||||
$this->assertNull($returnValue->getLog());
|
||||
$this->assertEquals($build->getBranch(), $returnValue->getBranch());
|
||||
$this->assertNotEquals($build->getCreated(), $returnValue->getCreated());
|
||||
$this->assertNull($returnValue->getStarted());
|
||||
$this->assertNull($returnValue->getFinished());
|
||||
$this->assertNotEquals($build->getCreateDate(), $returnValue->getCreateDate());
|
||||
$this->assertNull($returnValue->getStartDate());
|
||||
$this->assertNull($returnValue->getFinishDate());
|
||||
$this->assertEquals('test', $returnValue->getCommitMessage());
|
||||
$this->assertEquals('test@example.com', $returnValue->getCommitterEmail());
|
||||
$this->assertEquals($build->getExtra('item1'), $returnValue->getExtra('item1'));
|
||||
|
|
|
|||
|
|
@ -86,10 +86,10 @@ class BuildStatusServiceTest extends \PHPUnit\Framework\TestCase
|
|||
$build->setBranch(self::BRANCH);
|
||||
$build->setStatus($config[$configId]['status']);
|
||||
if ($config[$configId]['finishDateTime']) {
|
||||
$build->setFinished(new \DateTime($config[$configId]['finishDateTime']));
|
||||
$build->setFinishDate(new \DateTime($config[$configId]['finishDateTime']));
|
||||
}
|
||||
if (!empty($config[$configId]['startedDate'])) {
|
||||
$build->setStarted(new \DateTime('2014-10-25 21:20:02'));
|
||||
$build->setStartDate(new \DateTime('2014-10-25 21:20:02'));
|
||||
}
|
||||
|
||||
$project = $this->getProjectMock($config[$configId]['previousBuild'], $setProject);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue