@@ 479-491 (lines=13) @@ | ||
476 | /** |
|
477 | * Test remove content version |
|
478 | */ |
|
479 | public function testRemoveVersion() |
|
480 | { |
|
481 | $dm = static::$kernel->getContainer()->get('object_manager'); |
|
482 | $content = $this->repository->findOneByLanguageAndVersion('bien_vivre_en_france', 'fr', "1"); |
|
483 | $storageIds = array($content->geTId()); |
|
484 | $dm->detach($content); |
|
485 | ||
486 | $this->repository->removeContentVersion($storageIds); |
|
487 | $this->assertNull($this->repository->findOneByLanguageAndVersion('bien_vivre_en_france', 'fr', "1")); |
|
488 | ||
489 | $dm->persist($content); |
|
490 | $dm->flush(); |
|
491 | } |
|
492 | ||
493 | /** |
|
494 | * Generate columns of content with search value |
@@ 837-849 (lines=13) @@ | ||
834 | /** |
|
835 | * Test remove node version |
|
836 | */ |
|
837 | public function testRemoveVersion() |
|
838 | { |
|
839 | $dm = static::$kernel->getContainer()->get('object_manager'); |
|
840 | $node = $this->repository->findVersionNotDeleted('root', 'fr', '2', '1'); |
|
841 | $storageIds = array($node->geTId()); |
|
842 | $dm->detach($node); |
|
843 | ||
844 | $this->repository->removeNodeVersions($storageIds); |
|
845 | $this->assertNull($this->repository->findVersionNotDeleted('root', 'fr', '2', '1')); |
|
846 | ||
847 | $dm->persist($node); |
|
848 | $dm->flush(); |
|
849 | } |
|
850 | ||
851 | /** |
|
852 | * @param string $language |