Exemplo n.º 1
0
 public function test_it_updates_page_version_view()
 {
     $this->PageVersionManager->updatePageVersionView(1, 'some.view');
     $version = \DvsPageVersion::find(1);
     assertEquals('some.view', $version->view);
 }
Exemplo n.º 2
0
 public function test_it_gets_page_versions_by_ab()
 {
     $page = \DvsPage::find(1);
     $version = \DvsPageVersion::find(1);
     $version->ab_testing_amount = 50;
     $version->save();
     $newVersion = \DvsPageVersion::create(['page_id' => 1, 'created_by_user_id' => 1, 'name' => 'New Version', 'starts_at' => new \DateTime('yesterday'), 'ends_at' => null, 'ab_testing_amount' => 50]);
     $versions = $this->PagesRepository->getPageVersionsByAB($page);
     assertCount(2, $versions);
 }
Exemplo n.º 3
0
 public function test_it_finds_collections_for_page_version()
 {
     $this->CollectionFieldsFactory->shouldReceive('createFromCollectionInstance')->times(2);
     $output = $this->CollectionsRepository->findCollectionsForPageVersion(\DvsPageVersion::find(1));
 }