| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 17 | public function testIsExpressionValid() |
||
| 18 | { |
||
| 19 | $field = JSONText\Fields\JSONText::create('MyJSON'); |
||
| 20 | |||
| 21 | $this->assertTrue($field->isValidExpression('$..')); |
||
| 22 | $this->assertTrue($field->isValidExpression('$.[2]')); |
||
| 23 | $this->assertTrue($field->isValidExpression('$.cars.american[*]')); |
||
| 24 | $this->assertFalse($field->isValidExpression('$')); |
||
| 25 | $this->assertFalse($field->isValidExpression('$[2]')); |
||
| 26 | } |
||
| 27 | } |
||
| 28 |
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.