diff --git a/tests/unit/Activity/SettingTest.php b/tests/unit/Activity/SettingTest.php index 956d5c1d5..5b64df442 100644 --- a/tests/unit/Activity/SettingTest.php +++ b/tests/unit/Activity/SettingTest.php @@ -23,15 +23,20 @@ namespace OCA\Deck\Activity; +use OCP\IL10N; use PHPUnit\Framework\TestCase; class SettingTest extends TestCase { + /** @var IL10N */ + private $l10n; /** @var Setting */ private $setting; public function setUp() { - $this->setting = new Setting(); + $this->l10n = $this->createMock(IL10N::class); + $this->l10n->expects($this->any())->method('t')->will($this->returnCallback(function ($s) { return $s; })); + $this->setting = new Setting($this->l10n); } public function testGetIdentifier() { @@ -39,7 +44,7 @@ class SettingTest extends TestCase { } public function testGetName() { - $this->assertEquals('Deck', $this->setting->getName()); + $this->assertEquals('Changes in the Deck app', $this->setting->getName()); } public function testGetPriority() { diff --git a/tests/unit/Db/CardTest.php b/tests/unit/Db/CardTest.php index 0fc3c4b6d..ff8aeab39 100644 --- a/tests/unit/Db/CardTest.php +++ b/tests/unit/Db/CardTest.php @@ -83,6 +83,7 @@ class CardTest extends TestCase { 'assignedUsers' => null, 'deletedAt' => 0, 'commentsUnread' => 0, + 'lastEditor' => null, ], $card->jsonSerialize()); } public function testJsonSerializeLabels() { @@ -107,6 +108,7 @@ class CardTest extends TestCase { 'assignedUsers' => null, 'deletedAt' => 0, 'commentsUnread' => 0, + 'lastEditor' => null, ], $card->jsonSerialize()); } @@ -141,6 +143,7 @@ class CardTest extends TestCase { 'assignedUsers' => ['user1'], 'deletedAt' => 0, 'commentsUnread' => 0, + 'lastEditor' => null, ], $card->jsonSerialize()); }