3.0: Dockerized laravel 8.0
This commit is contained in:
		
							
								
								
									
										22
									
								
								tests/CreatesApplication.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								tests/CreatesApplication.php
									
									
									
									
									
										Normal 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;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										21
									
								
								tests/Feature/ExampleTest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								tests/Feature/ExampleTest.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace Tests\Feature;
 | 
			
		||||
 | 
			
		||||
use Illuminate\Foundation\Testing\RefreshDatabase;
 | 
			
		||||
use Tests\TestCase;
 | 
			
		||||
 | 
			
		||||
class ExampleTest extends TestCase
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     * A basic test example.
 | 
			
		||||
     *
 | 
			
		||||
     * @return void
 | 
			
		||||
     */
 | 
			
		||||
    public function testBasicTest()
 | 
			
		||||
    {
 | 
			
		||||
        $response = $this->get('/');
 | 
			
		||||
 | 
			
		||||
        $response->assertStatus(200);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										10
									
								
								tests/TestCase.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								tests/TestCase.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace Tests;
 | 
			
		||||
 | 
			
		||||
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
 | 
			
		||||
 | 
			
		||||
abstract class TestCase extends BaseTestCase
 | 
			
		||||
{
 | 
			
		||||
    use CreatesApplication;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										18
									
								
								tests/Unit/ExampleTest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								tests/Unit/ExampleTest.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace Tests\Unit;
 | 
			
		||||
 | 
			
		||||
use PHPUnit\Framework\TestCase;
 | 
			
		||||
 | 
			
		||||
class ExampleTest extends TestCase
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     * A basic test example.
 | 
			
		||||
     *
 | 
			
		||||
     * @return void
 | 
			
		||||
     */
 | 
			
		||||
    public function testBasicTest()
 | 
			
		||||
    {
 | 
			
		||||
        $this->assertTrue(true);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user