| Total Complexity | 3 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 16 | class FormTest extends AbstractTest |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var Form |
||
| 20 | */ |
||
| 21 | protected $object; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @dataProvider rendererTypeProvider |
||
| 25 | * @param string $type |
||
| 26 | * @param string $class |
||
| 27 | */ |
||
| 28 | public function testSetRendererType($type, $class) |
||
| 29 | { |
||
| 30 | $this->object->setRendererType($type); |
||
| 31 | |||
| 32 | $renderer = $this->object->getRenderer(); |
||
| 33 | self::assertInstanceOf($class, $renderer); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @return array |
||
| 38 | */ |
||
| 39 | public function rendererTypeProvider() |
||
| 40 | { |
||
| 41 | return [ |
||
| 42 | ['table', Nip_Form_Renderer_Table::class], |
||
| 43 | ['bootstrap', Nip_Form_Renderer_Bootstrap::class], |
||
| 44 | ['bootstrap4', Nip_Form_Renderer_Bootstrap4::class], |
||
| 45 | ]; |
||
| 46 | } |
||
| 47 | |||
| 48 | protected function setUp(): void |
||
| 52 | } |
||
| 53 | } |
||
| 54 |