You are here

class TestableProviderBasedGenerator in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony-cmf/routing/Tests/Routing/ProviderBasedGeneratorTest.php \Symfony\Cmf\Component\Routing\Tests\Routing\TestableProviderBasedGenerator

Overwrite doGenerate to reduce amount of mocking needed

Hierarchy

Expanded class hierarchy of TestableProviderBasedGenerator

File

vendor/symfony-cmf/routing/Tests/Routing/ProviderBasedGeneratorTest.php, line 130

Namespace

Symfony\Cmf\Component\Routing\Tests\Routing
View source
class TestableProviderBasedGenerator extends ProviderBasedGenerator {
  protected function doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $referenceType, $hostTokens, array $requiredSchemes = array()) {
    return 'result_url';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ProviderBasedGenerator::$provider protected property The route provider for this generator.
ProviderBasedGenerator::generate public function Generates a URL or path for a specific route based on the given parameters. Overrides UrlGenerator::generate 1
ProviderBasedGenerator::getRouteDebugMessage public function Convert a route identifier (name, content object etc) into a string usable for logging and other debug/error messages Overrides VersatileGeneratorInterface::getRouteDebugMessage 1
ProviderBasedGenerator::supports public function Support a route object and any string as route name Overrides VersatileGeneratorInterface::supports 1
ProviderBasedGenerator::__construct public function Overrides UrlGenerator::__construct
TestableProviderBasedGenerator::doGenerate protected function Overrides UrlGenerator::doGenerate
UrlGenerator::$context protected property
UrlGenerator::$decodedChars protected property This array defines the characters (besides alphanumeric ones) that will not be percent-encoded in the path segment of the generated URL.
UrlGenerator::$logger protected property
UrlGenerator::$routes protected property
UrlGenerator::$strictRequirements protected property
UrlGenerator::getContext public function Gets the request context. Overrides RequestContextAwareInterface::getContext
UrlGenerator::getRelativePath public static function Returns the target path as relative reference from the base path.
UrlGenerator::isStrictRequirements public function Returns whether to throw an exception on incorrect parameters. Null means the requirements check is deactivated completely. Overrides ConfigurableRequirementsInterface::isStrictRequirements
UrlGenerator::setContext public function Sets the request context. Overrides RequestContextAwareInterface::setContext
UrlGenerator::setStrictRequirements public function Enables or disables the exception on incorrect parameters. Passing null will deactivate the requirements check completely. Overrides ConfigurableRequirementsInterface::setStrictRequirements
UrlGeneratorInterface::ABSOLUTE_PATH constant Generates an absolute path, e.g. "/dir/file".
UrlGeneratorInterface::ABSOLUTE_URL constant Generates an absolute URL, e.g. "http://example.com/dir/file".
UrlGeneratorInterface::NETWORK_PATH constant Generates a network path, e.g. "//example.com/dir/file". Such reference reuses the current scheme but specifies the host.
UrlGeneratorInterface::RELATIVE_PATH constant Generates a relative path based on the current request path, e.g. "../parent-file".