This commit is contained in:
Marcel Pociot committed 2020-04-14 21:19:23 +02:00
commit 2b03398f40
48 files changed
+8099

No files matched your search

+22
View File
@@ -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;
}
}
+20
View File
@@ -0,0 +1,20 @@
<?php
namespace Tests\Feature;
use Tests\TestCase;
class InspiringCommandTest extends TestCase
{
/**
* A basic test example.
*
* @return void
*/
public function testInspiringCommand()
{
$this->artisan('inspiring')
->expectsOutput('Simplicity is the ultimate sophistication.')
->assertExitCode(0);
}
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace Tests;
use LaravelZero\Framework\Testing\TestCase as BaseTestCase;
abstract class TestCase extends BaseTestCase
{
use CreatesApplication;
}
+18
View File
@@ -0,0 +1,18 @@
<?php
namespace Tests\Unit;
use Tests\TestCase;
class ExampleTest extends TestCase
{
/**
* A basic test example.
*
* @return void
*/
public function testBasicTest()
{
$this->assertTrue(true);
}
}