class TestRouteBuilder in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php \Drupal\Tests\Core\Routing\TestRouteBuilder
Extends the core route builder with a setter method for the YAML discovery.
Hierarchy
- class \Drupal\Core\Routing\RouteBuilder implements DestructableInterface, RouteBuilderInterface
- class \Drupal\Tests\Core\Routing\TestRouteBuilder
Expanded class hierarchy of TestRouteBuilder
File
- core/
tests/ Drupal/ Tests/ Core/ Routing/ RouteBuilderTest.php, line 281 - Contains \Drupal\Tests\Core\Routing\RouteBuilderTest.
Namespace
Drupal\Tests\Core\RoutingView source
class TestRouteBuilder extends RouteBuilder {
/**
* The mocked YAML discovery.
*
* @var \Drupal\Component\Discovery\YamlDiscovery|\PHPUnit_Framework_MockObject_MockObject
*/
protected $yamlDiscovery;
/**
* Sets the YAML discovery.
*
* @param \Drupal\Component\Discovery\YamlDiscovery $yaml_discovery
* The YAML discovery to set.
*/
public function setYamlDiscovery(YamlDiscovery $yaml_discovery) {
$this->yamlDiscovery = $yaml_discovery;
}
/**
* {@inheritdoc}
*/
protected function getRouteDefinitions() {
return $this->yamlDiscovery
->findAll();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RouteBuilder:: |
protected | property | Flag that indicates if we are currently rebuilding the routes. | |
RouteBuilder:: |
protected | property | The check provider. | |
RouteBuilder:: |
protected | property | The controller resolver. | |
RouteBuilder:: |
protected | property | The event dispatcher to notify of routes. | |
RouteBuilder:: |
protected | property | The dumper to which we should send collected routes. | |
RouteBuilder:: |
protected | property | The used lock backend instance. | |
RouteBuilder:: |
protected | property | The module handler. | |
RouteBuilder:: |
protected | property | Flag that indicates if we should rebuild at the end of the request. | |
RouteBuilder:: |
protected | property | The route collection during the rebuild. | |
RouteBuilder:: |
public | function |
Performs destruct operations. Overrides DestructableInterface:: |
|
RouteBuilder:: |
public | function |
Rebuilds the route info and dumps to dumper. Overrides RouteBuilderInterface:: |
|
RouteBuilder:: |
public | function |
Rebuilds the route info and dumps to dumper if necessary. Overrides RouteBuilderInterface:: |
|
RouteBuilder:: |
public | function |
Sets the router to be rebuilt next time rebuildIfNeeded() is called. Overrides RouteBuilderInterface:: |
|
RouteBuilder:: |
public | function | Constructs the RouteBuilder using the passed MatcherDumperInterface. | |
TestRouteBuilder:: |
protected | property | The mocked YAML discovery. | |
TestRouteBuilder:: |
protected | function |
Retrieves all defined routes from .routing.yml files. Overrides RouteBuilder:: |
|
TestRouteBuilder:: |
public | function | Sets the YAML discovery. |