Neos\Flow\Tests\Functional\Persistence\PersistenceTest::commonObjectIsPersistedAndIsReconstituted PHP Method

commonObjectIsPersistedAndIsReconstituted() public method

    public function commonObjectIsPersistedAndIsReconstituted()
    {
        if ($this->objectManager->get(ConfigurationManager::class)->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Neos.Flow.persistence.backendOptions.driver') === 'pdo_pgsql') {
            $this->markTestSkipped('Doctrine ORM on PostgreSQL cannot store serialized data, thus storing objects with Type::OBJECT would fail. See http://www.doctrine-project.org/jira/browse/DDC-3241');
        }
        $commonObject = new Fixtures\CommonObject();
        $commonObject->setFoo('foo');
        $extendedTypesEntity = new Fixtures\ExtendedTypesEntity();
        $extendedTypesEntity->setCommonObject($commonObject);
        $this->persistenceManager->add($extendedTypesEntity);
        $this->persistenceManager->persistAll();
        $this->persistenceManager->clearState();
        /**  @var Fixtures\ExtendedTypesEntity $persistedExtendedTypesEntity */
        $persistedExtendedTypesEntity = $this->extendedTypesEntityRepository->findAll()->getFirst();
        $this->assertInstanceOf(Fixtures\ExtendedTypesEntity::class, $persistedExtendedTypesEntity);
        $this->assertInstanceOf(Fixtures\CommonObject::class, $persistedExtendedTypesEntity->getCommonObject());
        $this->assertEquals('foo', $persistedExtendedTypesEntity->getCommonObject()->getFoo());
    }
PersistenceTest