Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
10 | public function testIsFilterValidForScalar() |
||
11 | { |
||
12 | $string = 'abcd 3874'; |
||
13 | |||
14 | $entity = new \stdClass(); |
||
15 | $filter = new EntityFieldRegexpFilter(); |
||
16 | $filter->setEntityFieldName('title'); |
||
17 | |||
18 | $entity->title = $string; |
||
19 | $filter->setEntityFieldValue('/^[a-z]{1,4}\s?[\d]*$/'); |
||
20 | $this->assertEquals(true, $filter->isFilterValid($entity)); |
||
21 | } |
||
22 | } |