Fix tests for new setting

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2018-12-05 13:22:17 +01:00
parent dd104466d6
commit 4279e09cc2
2 changed files with 10 additions and 2 deletions

View File

@@ -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 <strong>Deck app</strong>', $this->setting->getName());
}
public function testGetPriority() {

View File

@@ -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());
}