public function testIsLinkable() { $this->assertFalse($this->extension->isLinkable(null)); $this->assertFalse($this->extension->isLinkable('a')); $this->assertFalse($this->extension->isLinkable($this)); $content = $this->getMock('Symfony\\Cmf\\Component\\Routing\\RouteReferrersReadInterface'); $content->expects($this->once())->method('getRoutes')->will($this->returnValue(array())); $this->assertFalse($this->extension->isLinkable($content)); $route = $this->getMockBuilder('Symfony\\Component\\Routing\\Route')->disableOriginalConstructor()->getMock(); $content = $this->getMock('Symfony\\Cmf\\Component\\Routing\\RouteReferrersReadInterface'); $content->expects($this->once())->method('getRoutes')->will($this->returnValue(array($route))); $this->assertTrue($this->extension->isLinkable($content)); }