mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
TEST filterAny on many_many relations return correct items
This commit is contained in:
parent
ef86b16854
commit
4f3deb13e0
@ -774,6 +774,15 @@ class DataListTest extends SapphireTest {
|
|||||||
$this->assertEquals(1, $list->count());
|
$this->assertEquals(1, $list->count());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testFilterAnyWithRelation() {
|
||||||
|
$list = DataObjectTest_Player::get();
|
||||||
|
$list = $list->filterAny(array(
|
||||||
|
'Teams.Title:StartsWith' => 'Team',
|
||||||
|
'ID:GreaterThan' => 0,
|
||||||
|
));
|
||||||
|
$this->assertCount(4, $list);
|
||||||
|
}
|
||||||
|
|
||||||
public function testFilterAnyMultipleArray() {
|
public function testFilterAnyMultipleArray() {
|
||||||
$list = DataObjectTest_TeamComment::get();
|
$list = DataObjectTest_TeamComment::get();
|
||||||
$list = $list->filterAny(array('Name'=>'Bob', 'Comment'=>'This is a team comment by Bob'));
|
$list = $list->filterAny(array('Name'=>'Bob', 'Comment'=>'This is a team comment by Bob'));
|
||||||
|
Loading…
Reference in New Issue
Block a user