Fix tests for new setting
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -23,15 +23,20 @@
|
|||||||
|
|
||||||
namespace OCA\Deck\Activity;
|
namespace OCA\Deck\Activity;
|
||||||
|
|
||||||
|
use OCP\IL10N;
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
class SettingTest extends TestCase {
|
class SettingTest extends TestCase {
|
||||||
|
|
||||||
|
/** @var IL10N */
|
||||||
|
private $l10n;
|
||||||
/** @var Setting */
|
/** @var Setting */
|
||||||
private $setting;
|
private $setting;
|
||||||
|
|
||||||
public function setUp() {
|
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() {
|
public function testGetIdentifier() {
|
||||||
@@ -39,7 +44,7 @@ class SettingTest extends TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function testGetName() {
|
public function testGetName() {
|
||||||
$this->assertEquals('Deck', $this->setting->getName());
|
$this->assertEquals('Changes in the <strong>Deck app</strong>', $this->setting->getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetPriority() {
|
public function testGetPriority() {
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ class CardTest extends TestCase {
|
|||||||
'assignedUsers' => null,
|
'assignedUsers' => null,
|
||||||
'deletedAt' => 0,
|
'deletedAt' => 0,
|
||||||
'commentsUnread' => 0,
|
'commentsUnread' => 0,
|
||||||
|
'lastEditor' => null,
|
||||||
], $card->jsonSerialize());
|
], $card->jsonSerialize());
|
||||||
}
|
}
|
||||||
public function testJsonSerializeLabels() {
|
public function testJsonSerializeLabels() {
|
||||||
@@ -107,6 +108,7 @@ class CardTest extends TestCase {
|
|||||||
'assignedUsers' => null,
|
'assignedUsers' => null,
|
||||||
'deletedAt' => 0,
|
'deletedAt' => 0,
|
||||||
'commentsUnread' => 0,
|
'commentsUnread' => 0,
|
||||||
|
'lastEditor' => null,
|
||||||
], $card->jsonSerialize());
|
], $card->jsonSerialize());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,6 +143,7 @@ class CardTest extends TestCase {
|
|||||||
'assignedUsers' => ['user1'],
|
'assignedUsers' => ['user1'],
|
||||||
'deletedAt' => 0,
|
'deletedAt' => 0,
|
||||||
'commentsUnread' => 0,
|
'commentsUnread' => 0,
|
||||||
|
'lastEditor' => null,
|
||||||
], $card->jsonSerialize());
|
], $card->jsonSerialize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user