Example #1
0
 /**
  * @test
  */
 public function render_withTemplateEngine_returnString()
 {
     $this->subject->setTemplateEngine(function () {
         return 'test';
     });
     $this->mockedFileLoader->shouldReceive('locate')->with('test', 'template')->andReturn('path');
     $response = $this->invokeMethod('render', ['test', ['param1' => 'value1', 'param2' => 'value2']]);
     $this->assertInstanceOf('Neat\\Http\\Response', $response);
     $this->assertSame('test', $response->body);
 }