/**
  * Проверка создания фабрики отвечающей за порождение менеджера сущностей доктрины
  *
  * @expectedException \OldTown\Workflow\Spi\Doctrine\Exception\DoctrineRuntimeException
  * @expectedExceptionMessage EntityManager not implement Doctrine\ORM\EntityManagerInterface
  */
 public function testGetEntityManagerInvalidResult()
 {
     $factoryMock = $this->getMockClass(EntityManagerFactoryInterface::class, ['factory']);
     $doctrineWorkflowStory = new DoctrineWorkflowStory();
     $doctrineWorkflowStory->init([DoctrineWorkflowStory::ENTITY_MANAGER_FACTORY => [DoctrineWorkflowStory::ENTITY_MANAGER_FACTORY_NAME => $factoryMock]]);
     /** @var EntityManagerFactoryInterface|PHPUnit_Framework_MockObject_MockObject $factoryMock */
     $factoryMock = $doctrineWorkflowStory->getEntityManagerFactory();
     $factoryMock->expects(static::once())->method('factory')->will(static::returnValue('invalid values'));
     $doctrineWorkflowStory->getEntityManager();
 }
 /**
  * @expectedException \OldTown\Workflow\Spi\Doctrine\Exception\RuntimeException
  * @expectedExceptionMessage Method OldTown\Workflow\Spi\Doctrine\DoctrineWorkflowStory::query not supported
  */
 public function testQuery()
 {
     /** @var WorkflowExpressionQuery $query */
     $query = $this->getMock(WorkflowExpressionQuery::class);
     $this->doctrineWorkflowStory->query($query);
 }