]> BookStack Code Mirror - bookstack/blobdiff - tests/ActivityTrackingTest.php
Code cleanup, bug squashing
[bookstack] / tests / ActivityTrackingTest.php
index 8a237f880d56c2504f7daa020b5bbe64461bff8e..9c3fe273c1cbf034ab8a7246f943cbabbe0d1e2c 100644 (file)
@@ -1,15 +1,14 @@
-<?php
+<?php namespace Tests;
 
-use Illuminate\Foundation\Testing\WithoutMiddleware;
-use Illuminate\Foundation\Testing\DatabaseMigrations;
-use Illuminate\Foundation\Testing\DatabaseTransactions;
 
-class ActivityTrackingTest extends TestCase
+use BookStack\Entities\Models\Book;
+
+class ActivityTrackingTest extends BrowserKitTest
 {
 
-    public function testRecentlyViewedBooks()
+    public function test_recently_viewed_books()
     {
-        $books = \BookStack\Book::all()->take(10);
+        $books = Book::all()->take(10);
 
         $this->asAdmin()->visit('/books')
             ->dontSeeInElement('#recents', $books[0]->name)
@@ -21,9 +20,9 @@ class ActivityTrackingTest extends TestCase
             ->seeInElement('#recents', $books[1]->name);
     }
 
-    public function testPopularBooks()
+    public function test_popular_books()
     {
-        $books = \BookStack\Book::all()->take(10);
+        $books = Book::all()->take(10);
 
         $this->asAdmin()->visit('/books')
             ->dontSeeInElement('#popular', $books[0]->name)