class ControllerTest in Render cache 7.2
Class Test @covers Drupal\render_cache\RenderCache\Controller\BaseController
Hierarchy
- class \Drupal\render_cache\RenderCache\Controller\ControllerTest extends \Drupal\render_cache\RenderCache\Controller\PHPUnit_Framework_TestCase
Expanded class hierarchy of ControllerTest
File
- tests/
src/ RenderCache/ Controller/ ControllerTest.php, line 13 - Contains \Drupal\render_cache\RenderCache\Controller\ControllerTest
Namespace
Drupal\render_cache\RenderCache\ControllerView source
class ControllerTest extends \PHPUnit_Framework_TestCase {
/**
* Tests that the controller interface has a view method.
*/
public function testControllerInterface() {
$mockController = $this
->getMockBuilder('\\Drupal\\render_cache\\RenderCache\\Controller\\ControllerInterface')
->disableOriginalConstructor()
->getMock();
$mockController
->expects($this
->any())
->method('view')
->will($this
->returnValue('foo'));
$objects = array();
$this
->assertEquals('foo', $mockController
->view($objects));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ControllerTest:: |
public | function | Tests that the controller interface has a view method. |