@@ 455-467 (lines=13) @@ | ||
452 | /** |
|
453 | * Test remove content version |
|
454 | */ |
|
455 | public function testRemoveVersion() |
|
456 | { |
|
457 | $dm = static::$kernel->getContainer()->get('object_manager'); |
|
458 | $content = $this->repository->findOneByLanguageAndVersion('bien_vivre_en_france', 'fr', "1"); |
|
459 | $storageIds = array($content->geTId()); |
|
460 | $dm->detach($content); |
|
461 | ||
462 | $this->repository->removeContentVersion($storageIds); |
|
463 | $this->assertNull($this->repository->findOneByLanguageAndVersion('bien_vivre_en_france', 'fr', "1")); |
|
464 | ||
465 | $dm->persist($content); |
|
466 | $dm->flush(); |
|
467 | } |
|
468 | ||
469 | /** |
|
470 | * Generate columns of content with search value |
@@ 781-793 (lines=13) @@ | ||
778 | /** |
|
779 | * Test remove node version |
|
780 | */ |
|
781 | public function testRemoveVersion() |
|
782 | { |
|
783 | $dm = static::$kernel->getContainer()->get('object_manager'); |
|
784 | $node = $this->repository->findVersionNotDeleted('root', 'fr', '2', '1'); |
|
785 | $storageIds = array($node->geTId()); |
|
786 | $dm->detach($node); |
|
787 | ||
788 | $this->repository->removeNodeVersions($storageIds); |
|
789 | $this->assertNull($this->repository->findVersionNotDeleted('root', 'fr', '2', '1')); |
|
790 | ||
791 | $dm->persist($node); |
|
792 | $dm->flush(); |
|
793 | } |
|
794 | ||
795 | /** |
|
796 | * @param string $language |