eZ\Publish\Core\Persistence\Legacy\Tests\Content\ObjectState\ObjectStateHandlerTest::testCreateGroup PHP Method

testCreateGroup() public method

public testCreateGroup ( )
    public function testCreateGroup()
    {
        $handler = $this->getObjectStateHandler();
        $mapperMock = $this->getMapperMock();
        $gatewayMock = $this->getGatewayMock();
        $mapperMock->expects($this->once())->method('createObjectStateGroupFromInputStruct')->with($this->equalTo($this->getInputStructFixture()))->will($this->returnValue($this->getObjectStateGroupFixture()));
        $gatewayMock->expects($this->once())->method('insertObjectStateGroup')->with($this->equalTo($this->getObjectStateGroupFixture()))->will($this->returnValue($this->getObjectStateGroupFixture()));
        $result = $handler->createGroup($this->getInputStructFixture());
        $this->assertInstanceOf('eZ\\Publish\\SPI\\Persistence\\Content\\ObjectState\\Group', $result);
    }