$this->controllerResolver =
new ControllerResolver($this->httpMessageFactory,
$class_resolver);
} /**
* Tests createController().
*
* @dataProvider providerTestCreateController
*/
public function testCreateController($controller,
$class,
$output) { $this->container->
set('some_service',
new MockController());
$result =
$this->controllerResolver->
getControllerFromDefinition($controller);
$this->
assertCallableController($result,
$class,
$output);
} /**
* Provides test data for testCreateController().
*/
public function providerTestCreateController() { return [ // Tests class::method.
['Drupal\Tests\Core\Controller\MockController::getResult', 'Drupal\Tests\Core\Controller\MockController', 'This is a regular controller.'
],
// Tests service:method.
['some_service:getResult', 'Drupal\Tests\Core\Controller\MockController', 'This is a regular controller.'
],