@@ 453-465 (lines=13) @@ | ||
450 | /** |
|
451 | * Test remove content version |
|
452 | */ |
|
453 | public function testRemoveVersion() |
|
454 | { |
|
455 | $dm = static::$kernel->getContainer()->get('object_manager'); |
|
456 | $content = $this->repository->findOneByLanguageAndVersion('bien_vivre_en_france', 'fr', "1"); |
|
457 | $storageIds = array($content->geTId()); |
|
458 | $dm->detach($content); |
|
459 | ||
460 | $this->repository->removeContentVersion($storageIds); |
|
461 | $this->assertNull($this->repository->findOneByLanguageAndVersion('bien_vivre_en_france', 'fr', "1")); |
|
462 | ||
463 | $dm->persist($content); |
|
464 | $dm->flush(); |
|
465 | } |
|
466 | ||
467 | /** |
|
468 | * Generate columns of content with search value |
@@ 818-830 (lines=13) @@ | ||
815 | /** |
|
816 | * Test remove node version |
|
817 | */ |
|
818 | public function testRemoveVersion() |
|
819 | { |
|
820 | $dm = static::$kernel->getContainer()->get('object_manager'); |
|
821 | $node = $this->repository->findVersionNotDeleted('root', 'fr', '2', '1'); |
|
822 | $storageIds = array($node->geTId()); |
|
823 | $dm->detach($node); |
|
824 | ||
825 | $this->repository->removeNodeVersions($storageIds); |
|
826 | $this->assertNull($this->repository->findVersionNotDeleted('root', 'fr', '2', '1')); |
|
827 | ||
828 | $dm->persist($node); |
|
829 | $dm->flush(); |
|
830 | } |
|
831 | ||
832 | /** |
|
833 | * @param string $language |