CRUDlexTests\ServiceProviderTest::testCustomEntityDefinitionFactory PHP Method

testCustomEntityDefinitionFactory() public method

    public function testCustomEntityDefinitionFactory()
    {
        $serviceProvider = new ServiceProvider();
        $app = new Application();
        $entityDefinitionFactoryHandle = Phony::mock('\\CRUDlex\\EntityDefinitionFactory');
        $entityDefinitionFactoryHandle->createEntityDefinition->returns(new \CRUDlex\EntityDefinition('', ['isOpenOnSundays' => [], 'author' => [], 'title' => [], 'library' => [], 'libraryBook' => []], '', '', [], $serviceProvider));
        $entityDefinitionFactoryMock = $entityDefinitionFactoryHandle->get();
        $app['crud.entitydefinitionfactory'] = $entityDefinitionFactoryMock;
        $serviceProvider->init($this->dataFactory, $this->crudFile, $this->fileProcessorMock, true, $app);
        $entityDefinitionFactoryHandle->createEntityDefinition->twice()->called();
    }