| @@ 95-111 (lines=17) @@ | ||
| 92 | /** |
|
| 93 | * Test render of the template with parameter |
|
| 94 | */ |
|
| 95 | public function testTemplateRenderWithParameter() |
|
| 96 | { |
|
| 97 | $this->frontRender = new FrontRender($this->engine, $this->eventDispatcher, self::TEMPLATE); |
|
| 98 | ||
| 99 | $this->frontRender->setParameters( |
|
| 100 | [ |
|
| 101 | 'applicationName' => 'Test Render', |
|
| 102 | ] |
|
| 103 | ); |
|
| 104 | ||
| 105 | $response = new Response($this->frontRender->render()); |
|
| 106 | ||
| 107 | $this->assertContains( |
|
| 108 | 'Welcome on Test Render', |
|
| 109 | $response->getContent() |
|
| 110 | ); |
|
| 111 | } |
|
| 112 | ||
| 113 | /** |
|
| 114 | * Test render of the template without parameter |
|
| @@ 116-126 (lines=11) @@ | ||
| 113 | /** |
|
| 114 | * Test render of the template without parameter |
|
| 115 | */ |
|
| 116 | public function testTemplateRenderWithoutParameter() |
|
| 117 | { |
|
| 118 | $this->frontRender = new FrontRender($this->engine, $this->eventDispatcher, self::TEMPLATE); |
|
| 119 | ||
| 120 | $response = new Response($this->frontRender->render()); |
|
| 121 | ||
| 122 | $this->assertNotContains( |
|
| 123 | 'Test Render', |
|
| 124 | $response->getContent() |
|
| 125 | ); |
|
| 126 | } |
|
| 127 | ||
| 128 | /** |
|
| 129 | * Test on the update of lexer |
|