add tests for parent/child search, to try and trigger #743
This commit is contained in:
parent
7f37607d9d
commit
0e1f6d0ef0
1 changed files with 15 additions and 0 deletions
|
@ -74,6 +74,21 @@ class RelationshipsTest extends ShimmiePHPUnitTestCase
|
|||
return [$image_1, $image_2, $image_3];
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testSetParent
|
||||
*/
|
||||
public function testSearch($imgs)
|
||||
{
|
||||
[$image_1, $image_2, $image_3] = $this->testSetParent(null);
|
||||
|
||||
$this->assert_search_results(["parent:any"], [$image_2->id]);
|
||||
$this->assert_search_results(["parent:none"], [$image_3->id, $image_1->id]);
|
||||
$this->assert_search_results(["parent:{$image_1->id}"], [$image_2->id]);
|
||||
|
||||
$this->assert_search_results(["child:any"], [$image_1->id]);
|
||||
$this->assert_search_results(["child:none"], [$image_3->id, $image_2->id]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testChangeParent
|
||||
*/
|
||||
|
|
Reference in a new issue