Neos\Flow\Tests\Functional\Persistence\Doctrine\RepositoryTest::modificationsOnRetrievedEntitiesArePersistedIfUpdateHasBeenCalled PHP Метод

modificationsOnRetrievedEntitiesArePersistedIfUpdateHasBeenCalled() публичный Метод

    public function modificationsOnRetrievedEntitiesArePersistedIfUpdateHasBeenCalled()
    {
        $this->postRepository = $this->objectManager->get(Fixtures\PostRepository::class);
        $post = new Fixtures\Post();
        $post->setTitle('Sample');
        $this->postRepository->add($post);
        $this->persistenceManager->persistAll();
        $post = $this->postRepository->findOneByTitle('Sample');
        $post->setTitle('Modified Sample');
        $this->postRepository->update($post);
        $this->persistenceManager->persistAll();
        $post = $this->postRepository->findOneByTitle('Modified Sample');
        $this->assertNotNull($post);
        $this->assertEquals('Modified Sample', $post->getTitle());
    }