Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
b974dd5b73
commit
81455479bc
|
@ -402,6 +402,7 @@ class CommentsNodeTest extends \Test\TestCase {
|
|||
$ns . 'latestChildDateTime' => new \DateTime('2016-01-12 18:48:00'),
|
||||
$ns . 'objectType' => 'files',
|
||||
$ns . 'objectId' => '1848',
|
||||
$ns . 'referenceId' => 'ref',
|
||||
$ns . 'isUnread' => null,
|
||||
];
|
||||
|
||||
|
@ -468,6 +469,10 @@ class CommentsNodeTest extends \Test\TestCase {
|
|||
->method('getObjectId')
|
||||
->willReturn($expected[$ns . 'objectId']);
|
||||
|
||||
$this->comment->expects($this->once())
|
||||
->method('getReferenceId')
|
||||
->willReturn($expected[$ns . 'referenceId']);
|
||||
|
||||
$user = $this->getMockBuilder(IUser::class)
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
@ -483,7 +488,7 @@ class CommentsNodeTest extends \Test\TestCase {
|
|||
$properties = $this->node->getProperties(null);
|
||||
|
||||
foreach($properties as $name => $value) {
|
||||
$this->assertTrue(array_key_exists($name, $expected));
|
||||
$this->assertArrayHasKey($name, $expected);
|
||||
$this->assertSame($expected[$name], $value);
|
||||
unset($expected[$name]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue