| Conditions | 1 |
| Paths | 1 |
| Total Lines | 31 |
| Code Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | public function testRender() |
||
| 19 | { |
||
| 20 | $app = 'index_ssr'; |
||
|
|
|||
| 21 | $meta = ['title']; |
||
| 22 | $state = ['hello']; |
||
| 23 | |||
| 24 | $parameters = [ |
||
| 25 | 'title' => 'hogehoge', |
||
| 26 | 'hello' => [ |
||
| 27 | 'name' => 'polidog', |
||
| 28 | ], |
||
| 29 | ]; |
||
| 30 | |||
| 31 | $baracoa = $this->prophesize(BaracoaInterface::class); |
||
| 32 | $baracoa->render(Argument::any(), Argument::any(), Argument::any()) |
||
| 33 | ->willReturn('string'); |
||
| 34 | |||
| 35 | $ssr = new Ssr([]); |
||
| 36 | $ssr->setApp($app); |
||
| 37 | $ssr->setMetas($meta); |
||
| 38 | $ssr->setState($state); |
||
| 39 | |||
| 40 | $ssrRender = new SsrRender($baracoa->reveal()); |
||
| 41 | $ssrRender->render($ssr, $parameters); |
||
| 42 | |||
| 43 | $baracoa->render( |
||
| 44 | $ssr->getApp(), |
||
| 45 | ['hello' => ['name' => 'polidog']], |
||
| 46 | ['title' => 'hogehoge'] |
||
| 47 | )->shouldHaveBeenCalled(); |
||
| 48 | } |
||
| 49 | } |
||
| 50 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.