about summary refs log tree commit diff
path: root/laravel/tests
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@gmail.com>2018-12-26 09:52:37 -0500
committerZach DeCook <zachdecook@gmail.com>2018-12-26 09:52:37 -0500
commit77f1076c15fbb8bf826a58cb2d556801a82a81ee (patch)
tree2d8dd905708c9bafe397aed4dbb7d03a644b48cb /laravel/tests
parentd034708620b528d08bc8c4750439f84de484bc4a (diff)
downloadprosongsa-77f1076c15fbb8bf826a58cb2d556801a82a81ee.tar.gz
- Add laravel site directories
Diffstat (limited to 'laravel/tests')
-rw-r--r--laravel/tests/CreatesApplication.php22
-rw-r--r--laravel/tests/Feature/ExampleTest.php21
-rw-r--r--laravel/tests/TestCase.php10
-rw-r--r--laravel/tests/Unit/ExampleTest.php19
4 files changed, 72 insertions, 0 deletions
diff --git a/laravel/tests/CreatesApplication.php b/laravel/tests/CreatesApplication.php
new file mode 100644
index 0000000..547152f
--- /dev/null
+++ b/laravel/tests/CreatesApplication.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace Tests;
+
+use Illuminate\Contracts\Console\Kernel;
+
+trait CreatesApplication
+{
+    /**
+     * Creates the application.
+     *
+     * @return \Illuminate\Foundation\Application
+     */
+    public function createApplication()
+    {
+        $app = require __DIR__.'/../bootstrap/app.php';
+
+        $app->make(Kernel::class)->bootstrap();
+
+        return $app;
+    }
+}
diff --git a/laravel/tests/Feature/ExampleTest.php b/laravel/tests/Feature/ExampleTest.php
new file mode 100644
index 0000000..f31e495
--- /dev/null
+++ b/laravel/tests/Feature/ExampleTest.php
@@ -0,0 +1,21 @@
+<?php
+
+namespace Tests\Feature;
+
+use Tests\TestCase;
+use Illuminate\Foundation\Testing\RefreshDatabase;
+
+class ExampleTest extends TestCase
+{
+    /**
+     * A basic test example.
+     *
+     * @return void
+     */
+    public function testBasicTest()
+    {
+        $response = $this->get('/');
+
+        $response->assertStatus(200);
+    }
+}
diff --git a/laravel/tests/TestCase.php b/laravel/tests/TestCase.php
new file mode 100644
index 0000000..2932d4a
--- /dev/null
+++ b/laravel/tests/TestCase.php
@@ -0,0 +1,10 @@
+<?php
+
+namespace Tests;
+
+use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
+
+abstract class TestCase extends BaseTestCase
+{
+    use CreatesApplication;
+}
diff --git a/laravel/tests/Unit/ExampleTest.php b/laravel/tests/Unit/ExampleTest.php
new file mode 100644
index 0000000..e9fe19c
--- /dev/null
+++ b/laravel/tests/Unit/ExampleTest.php
@@ -0,0 +1,19 @@
+<?php
+
+namespace Tests\Unit;
+
+use Tests\TestCase;
+use Illuminate\Foundation\Testing\RefreshDatabase;
+
+class ExampleTest extends TestCase
+{
+    /**
+     * A basic test example.
+     *
+     * @return void
+     */
+    public function testBasicTest()
+    {
+        $this->assertTrue(true);
+    }
+}