Example #1
0
 /**
  * Test render template methods (with and without Response).
  *
  * @return void
  */
 public function testRenderTemplates()
 {
     $content = $this->controller->renderText('test.html.twig', ['arg' => '']);
     $this->assertContains('Page loaded successfully', $content);
     $response = $this->controller->render('test.html.twig', ['arg' => '']);
     $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\Response', $response);
     $this->assertContains('Page loaded successfully', $response->getContent());
     $this->assertEquals(200, $response->getStatusCode());
 }