eZ\Publish\Core\Persistence\Legacy\Tests\Content\Type\ContentTypeHandlerTest::testLoadByIdentifier PHP Method

testLoadByIdentifier() public method

    public function testLoadByIdentifier()
    {
        $gatewayMock = $this->getGatewayMock();
        $gatewayMock->expects($this->once())->method('loadTypeDataByIdentifier')->with($this->equalTo('blogentry'), $this->equalTo(0))->will($this->returnValue(array()));
        $mapperMock = $this->getMapperMock();
        $mapperMock->expects($this->once())->method('extractTypesFromRows')->will($this->returnValue(array(new Type())));
        $handler = $this->getHandler();
        $type = $handler->loadByIdentifier('blogentry');
        $this->assertEquals(new Type(), $type, 'Type not loaded correctly');
    }