* @dataProvider filterProvider */
(string $variable)
| 36 | * @dataProvider filterProvider |
| 37 | */ |
| 38 | public function testParseFilter(string $variable) |
| 39 | { |
| 40 | $ref = new \ReflectionMethod(VariableService::class, 'parseFilter'); |
| 41 | $result = $ref->invoke($this->service, $variable); |
| 42 | |
| 43 | $this->assertIsArray($result); |
| 44 | $this->assertArrayHasKey('option', $result); |
| 45 | $this->assertArrayHasKey('value', $result); |
| 46 | |
| 47 | if (str_contains($variable, 'quarter')) { |
| 48 | $this->assertSame('BETWEEN', $result['option']); |
| 49 | $this->assertIsArray($result['value']); |
| 50 | $this->assertCount(2, $result['value']); |
| 51 | } else { |
| 52 | $this->assertSame('GT', $result['option']); |
| 53 | $this->assertIsInt($result['value']); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | public function filterProvider(): array |
| 58 | { |
nothing calls this directly
no outgoing calls
no test coverage detected