aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCamil Staps2016-09-25 23:56:46 +0200
committerCamil Staps2016-09-26 01:02:05 +0200
commit33ad0c14d168d36a4e7ad42dc6aa6a37a7335849 (patch)
tree0543b7d92f7f0b7706f4313ba10b18483f747798 /tests
parentAdded unique visitors to statistics (diff)
Change from lumen 5.2 to laravel 5.3 (Resolves #1)
Diffstat (limited to 'tests')
-rw-r--r--tests/ExampleTest.php8
-rw-r--r--tests/TestCase.php17
2 files changed, 20 insertions, 5 deletions
diff --git a/tests/ExampleTest.php b/tests/ExampleTest.php
index 67c9299..2f2d20f 100644
--- a/tests/ExampleTest.php
+++ b/tests/ExampleTest.php
@@ -1,15 +1,19 @@
<?php
+use Illuminate\Foundation\Testing\WithoutMiddleware;
+use Illuminate\Foundation\Testing\DatabaseMigrations;
+use Illuminate\Foundation\Testing\DatabaseTransactions;
+
class ExampleTest extends TestCase
{
/**
- * A basic test example.
+ * A basic functional test example.
*
* @return void
*/
public function testBasicExample()
{
$this->visit('/')
- ->see('Lumen.');
+ ->see('Laravel');
}
}
diff --git a/tests/TestCase.php b/tests/TestCase.php
index 651d9cb..8208edc 100644
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -1,14 +1,25 @@
<?php
-class TestCase extends Laravel\Lumen\Testing\TestCase
+abstract 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.
*
- * @return \Laravel\Lumen\Application
+ * @return \Illuminate\Foundation\Application
*/
public function createApplication()
{
- return require __DIR__.'/../bootstrap/app.php';
+ $app = require __DIR__.'/../bootstrap/app.php';
+
+ $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
+
+ return $app;
}
}