| Total Complexity | 4 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class ConfigurationTest extends TestCase |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @test |
||
| 13 | */ |
||
| 14 | public function configure_shortcode_with_controller_reference_only(): void |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @test |
||
| 24 | */ |
||
| 25 | public function configure_shortcode_with_controller_as_key(): void |
||
| 26 | { |
||
| 27 | $processedConfig = $this->processSingleConfig(['shortcodes' => ['test-1' => ['controller' => 'Foo::bar']]]); |
||
| 28 | |||
| 29 | self::assertSame('Foo::bar', $processedConfig['shortcodes']['test-1']['controller']); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @test |
||
| 34 | */ |
||
| 35 | public function configure_shortcode_with_method(): void |
||
| 36 | { |
||
| 37 | $processedConfig = $this->processSingleConfig(['shortcodes' => ['test-1' => ['controller' => 'Foo::bar', 'method' => 'esi']]]); |
||
| 38 | |||
| 39 | self::assertSame('esi', $processedConfig['shortcodes']['test-1']['method']); |
||
| 40 | } |
||
| 41 | |||
| 42 | private function processSingleConfig(array $config): array |
||
| 45 | } |
||
| 46 | } |
||
| 47 |