You are here

public function ControllerTest::testControllerInterface in Render cache 7.2

Tests that the controller interface has a view method.

File

tests/src/RenderCache/Controller/ControllerTest.php, line 18
Contains \Drupal\render_cache\RenderCache\Controller\ControllerTest

Class

ControllerTest
Class Test @covers Drupal\render_cache\RenderCache\Controller\BaseController

Namespace

Drupal\render_cache\RenderCache\Controller

Code

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));
}