| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public function testBuildExpression() |
||
| 11 | { |
||
| 12 | /** @var EditableCustomRule $rule1 */ |
||
| 13 | $rule1 = $this->objFromFixture('EditableCustomRule', 'rule1'); |
||
| 14 | $result1 = $rule1->buildExpression(); |
||
| 15 | |||
| 16 | //Dropdowns expect change event |
||
| 17 | $this->assertEquals('change', $result1['event']); |
||
| 18 | $this->assertNotEmpty($result1['operation']); |
||
| 19 | //Check for equals sign |
||
| 20 | $this->assertContains('==', $result1['operation']); |
||
| 21 | |||
| 22 | /** @var EditableCustomRule $rule2 */ |
||
| 23 | $rule2 = $this->objFromFixture('EditableCustomRule', 'rule2'); |
||
| 24 | $result2 = $rule2->buildExpression(); |
||
| 25 | //TextField expect change event |
||
| 26 | $this->assertEquals('keyup', $result2['event']); |
||
| 27 | $this->assertNotEmpty($result2['operation']); |
||
| 28 | //Check for greater than sign |
||
| 29 | $this->assertContains('>', $result2['operation']); |
||
| 30 | } |
||
| 31 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.