Browse Source

Update test case.

Taylor Otwell 9 years ago
parent
commit
ed93318cb7
2 changed files with 12 additions and 3 deletions
  1. 5 3
      tests/ExampleTest.php
  2. 7 0
      tests/TestCase.php

+ 5 - 3
tests/ExampleTest.php

@@ -1,5 +1,8 @@
 <?php
 
+use Illuminate\Foundation\Testing\WithoutMiddleware;
+use Illuminate\Foundation\Testing\DatabaseTransactions;
+
 class ExampleTest extends TestCase
 {
     /**
@@ -9,8 +12,7 @@ class ExampleTest extends TestCase
      */
     public function testBasicExample()
     {
-        $response = $this->call('GET', '/');
-
-        $this->assertEquals(200, $response->status());
+        $this->visit('/')
+             ->see('Laravel 5');
     }
 }

+ 7 - 0
tests/TestCase.php

@@ -2,6 +2,13 @@
 
 class TestCase extends Illuminate\Foundation\Testing\TestCase
 {
+    /**
+     * The base URL to use while testing the application.
+     *
+     * @var string
+     */
+    protected $baseUrl = 'http://localhost';
+
     /**
      * Creates the application.
      *