diff --git a/tests/unit/Db/CardTest.php b/tests/unit/Db/CardTest.php index b7062d16c..e9554c370 100644 --- a/tests/unit/Db/CardTest.php +++ b/tests/unit/Db/CardTest.php @@ -52,6 +52,8 @@ class CardTest extends \PHPUnit_Framework_TestCase { 'order' => 12, 'stackId' => 1, 'labels' => null, + 'duedate' => null, + 'overdue' => 0, 'archived' => false, ], $card->jsonSerialize()); } @@ -69,6 +71,8 @@ class CardTest extends \PHPUnit_Framework_TestCase { 'order' => 12, 'stackId' => 1, 'labels' => array(), + 'duedate' => null, + 'overdue' => 0, 'archived' => false, ], $card->jsonSerialize()); } diff --git a/tests/unit/Service/CardServiceTest.php b/tests/unit/Service/CardServiceTest.php index c673ccbee..67469b2d6 100644 --- a/tests/unit/Service/CardServiceTest.php +++ b/tests/unit/Service/CardServiceTest.php @@ -98,12 +98,13 @@ class CardServiceTest extends TestCase { $card->setArchived(false); $this->cardMapper->expects($this->once())->method('find')->willReturn($card); $this->cardMapper->expects($this->once())->method('update')->willReturnCallback(function($c) { return $c; }); - $actual = $this->cardService->update(123, 'newtitle', 234, 'text', 999, 'foo', 'admin'); + $actual = $this->cardService->update(123, 'newtitle', 234, 'text', 999, 'foo', 'admin', '2017-01-01 00:00:00'); $this->assertEquals('newtitle', $actual->getTitle()); $this->assertEquals(234, $actual->getStackId()); $this->assertEquals('text', $actual->getType()); $this->assertEquals(999, $actual->getOrder()); $this->assertEquals('foo', $actual->getDescription()); + $this->assertEquals('2017-01-01 00:00:00', $actual->getDuedate()); } public function testUpdateArchived() { @@ -113,7 +114,7 @@ class CardServiceTest extends TestCase { $this->cardMapper->expects($this->once())->method('find')->willReturn($card); $this->cardMapper->expects($this->never())->method('update'); $this->setExpectedException(StatusException::class); - $this->cardService->update(123, 'newtitle', 234, 'text', 999, 'foo', 'admin'); + $this->cardService->update(123, 'newtitle', 234, 'text', 999, 'foo', 'admin', '2017-01-01 00:00:00'); } public function testRename() { diff --git a/tests/unit/controller/CardControllerTest.php b/tests/unit/controller/CardControllerTest.php index 8ac88d2a8..ea618162b 100644 --- a/tests/unit/controller/CardControllerTest.php +++ b/tests/unit/controller/CardControllerTest.php @@ -74,9 +74,9 @@ class CardControllerTest extends \PHPUnit_Framework_TestCase { public function testUpdate() { $this->cardService->expects($this->once()) ->method('update') - ->with(1, 'title', 3, 'text', 5, 'foo', $this->userId) + ->with(1, 'title', 3, 'text', 5, 'foo', $this->userId, '2017-01-01 00:00:00') ->willReturn(1); - $this->assertEquals(1, $this->controller->update(1, 'title', 3, 'text', 5, 'foo')); + $this->assertEquals(1, $this->controller->update(1, 'title', 3, 'text', 5, 'foo', '2017-01-01 00:00:00')); } public function testDelete() {