-<?php
+<?php namespace Tests;
-use Illuminate\Support\Facades\DB;
-
-class EntityTest extends TestCase
+class EntityTest extends BrowserKitTest
{
public function test_entity_creation()
$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')
$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);
}
$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);
}