]> BookStack Code Mirror - bookstack/blobdiff - tests/Entity/EntityTest.php
Add APP_LOGGING
[bookstack] / tests / Entity / EntityTest.php
index 20721968f9a88c933d41cfa9efbb60c5cc652437..5fa331737148f08419d111c74ff8c8ee9bb18164 100644 (file)
@@ -1,8 +1,6 @@
-<?php
+<?php namespace Tests;
 
-use Illuminate\Support\Facades\DB;
-
-class EntityTest extends TestCase
+class EntityTest extends BrowserKitTest
 {
 
     public function test_entity_creation()
@@ -136,7 +134,7 @@ class EntityTest extends TestCase
         $this->asAdmin()
             ->visit('/books')
             // Choose to create a book
-            ->click('Add new book')
+            ->click('Create New Book')
             ->seePageIs('/books/create')
             // Fill out form & save
             ->type($book->name, '#name')
@@ -168,7 +166,7 @@ class EntityTest extends TestCase
         $entities = $this->createEntityChainBelongingToUser($creator, $updater);
         $this->actingAs($creator);
         app('BookStack\Repos\UserRepo')->destroy($creator);
-        app('BookStack\Repos\PageRepo')->saveRevision($entities['page']);
+        app('BookStack\Repos\EntityRepo')->savePageRevision($entities['page']);
 
         $this->checkEntitiesViewable($entities);
     }
@@ -181,7 +179,7 @@ class EntityTest extends TestCase
         $entities = $this->createEntityChainBelongingToUser($creator, $updater);
         $this->actingAs($updater);
         app('BookStack\Repos\UserRepo')->destroy($updater);
-        app('BookStack\Repos\PageRepo')->saveRevision($entities['page']);
+        app('BookStack\Repos\EntityRepo')->savePageRevision($entities['page']);
 
         $this->checkEntitiesViewable($entities);
     }