function MockContainerAware::getResult

Same name in this branch
  1. 10 core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\MockContainerAware::getResult()
Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\MockContainerAware::getResult()
  2. 8.9.x core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\MockContainerAware::getResult()

File

core/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php, line 268

Class

MockContainerAware

Namespace

Drupal\Tests\Core\Utility

Code

public function getResult($suffix) {
    if (empty($this->container)) {
        throw new \Exception('Container was not injected.');
    }
    return __METHOD__ . '+' . $suffix;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.