| Conditions | 2 |
| Paths | 2 |
| Total Lines | 26 |
| Code Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function testCreate() |
||
| 23 | { |
||
| 24 | $id = 'bde8a749-b409-43c6-a061-c6a7d2dce6a0'; |
||
| 25 | $name = 'Foo'; |
||
| 26 | $identifier = 'foo'; |
||
| 27 | $header = 'bar'; |
||
| 28 | $footer = 'baz'; |
||
| 29 | $cssFiles = ['qux', 'quux']; |
||
| 30 | $jsFiles = ['poic', 'yozz']; |
||
| 31 | $body = 'pior'; |
||
| 32 | |||
| 33 | $assets = new Entity\Assets($identifier, $header, $footer, $cssFiles, $jsFiles); |
||
| 34 | $entity = new Entity($id, $name, $identifier, '', $body, $assets); |
||
| 35 | |||
| 36 | $actualResult = $this->sut->create($entity); |
||
| 37 | |||
| 38 | $this->assertIsArray($actualResult); |
||
| 39 | |||
| 40 | $html = ''; |
||
| 41 | foreach ($actualResult as $item) { |
||
| 42 | $html .= (string)$item; |
||
| 43 | } |
||
| 44 | $this->assertStringContainsString('header', $html); |
||
| 45 | $this->assertStringContainsString('footer', $html); |
||
| 46 | $this->assertStringContainsString('css-files', $html); |
||
| 47 | $this->assertStringContainsString('js-files', $html); |
||
| 48 | } |
||
| 50 |