eZ\Bundle\EzPublishDebugBundle\Tests\Collector\EzPublishCoreCollectorTest::testAddGetCollector PHP Method

testAddGetCollector() public method

public testAddGetCollector ( )
    public function testAddGetCollector()
    {
        $collector = $this->getMock('\\Symfony\\Component\\HttpKernel\\DataCollector\\DataCollectorInterface');
        $name = 'foobar';
        $collector->expects($this->once())->method('getName')->will($this->returnValue($name));
        $this->mainCollector->addCollector($collector);
        $this->assertSame($collector, $this->mainCollector->getCollector($name));
    }