| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class GetTest extends AbstractRule |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Test fetching a simple value without locale information. |
||
| 19 | */ |
||
| 20 | public function testWithoutLocale() |
||
| 21 | { |
||
| 22 | $this->assertRuleResults(['test' => 'toto 1'], [], ['field' => 'test'], 'toto 1'); |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Test results when column don't exist. |
||
| 27 | */ |
||
| 28 | public function testUnfound() |
||
| 29 | { |
||
| 30 | $this->assertRuleResults(['test' => 'toto 1'], [], ['field' => 'test-1'], null); |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @inheritdoc |
||
| 35 | */ |
||
| 36 | protected function getRule() |
||
| 37 | { |
||
| 38 | return new Get(new NullLogger()); |
||
| 39 | } |
||
| 40 | } |