| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 2 | Features | 1 |
| 1 | <?php |
||
| 11 | public function testRender() |
||
| 12 | { |
||
| 13 | $arrayField = new ArrayField (); |
||
| 14 | $arrayField->setOptions([ |
||
| 15 | 'glue' => ', ' |
||
| 16 | ]); |
||
| 17 | // test simple string array |
||
| 18 | $value = [ |
||
| 19 | 'test', |
||
| 20 | 'lol', |
||
| 21 | 'panda' |
||
| 22 | ]; |
||
| 23 | $this->assertEquals('test, lol, panda', $arrayField->render($value)); |
||
| 24 | // test with array collection |
||
| 25 | $value = new ArrayCollection(); |
||
| 26 | $value->add('test'); |
||
| 27 | $value->add('lol'); |
||
| 28 | $value->add('panda'); |
||
| 29 | $this->assertEquals('test, lol, panda', $arrayField->render($value)); |
||
| 30 | } |
||
| 31 | } |
||
| 32 |