You are here

public function RouteContentEnhancerTest::testContent in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony-cmf/routing/Tests/Enhancer/RouteContentEnhancerTest.php \Symfony\Cmf\Component\Routing\Tests\Enhancer\RouteContentEnhancerTest::testContent()

File

vendor/symfony-cmf/routing/Tests/Enhancer/RouteContentEnhancerTest.php, line 40

Class

RouteContentEnhancerTest

Namespace

Symfony\Cmf\Component\Routing\Tests\Enhancer

Code

public function testContent() {
  $targetDocument = new TargetDocument();
  $this->document
    ->expects($this
    ->once())
    ->method('getContent')
    ->will($this
    ->returnValue($targetDocument));
  $defaults = array(
    RouteObjectInterface::ROUTE_OBJECT => $this->document,
  );
  $expected = array(
    RouteObjectInterface::ROUTE_OBJECT => $this->document,
    '_content' => $targetDocument,
  );
  $this
    ->assertEquals($expected, $this->mapper
    ->enhance($defaults, $this->request));
}