Add missing tests

This commit is contained in:
DariusIII
2018-07-26 10:59:19 +02:00
parent 1c3ddb5c50
commit 51edce3c05
5 changed files with 76 additions and 0 deletions
+1
View File
@@ -1,4 +1,5 @@
2018-07-26 DariusIII
* Chg: Add missing tests
* Chg: Update releases date handling in RSS and API operations
* Chg: Update tinymce to version 4.8.1
2018-07-25 DariusIII
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace Tests;
use Illuminate\Support\Facades\Hash;
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();
Hash::driver('bcrypt')->setRounds(4);
return $app;
}
}
+21
View File
@@ -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);
}
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace Tests;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
abstract class TestCase extends BaseTestCase
{
use CreatesApplication;
}
+19
View File
@@ -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);
}
}