#21 clean up the tests
This commit is contained in:
8
Makefile
8
Makefile
@@ -43,13 +43,15 @@ unittest-db:
|
|||||||
sqlite3 database/unittest.sqlite ""
|
sqlite3 database/unittest.sqlite ""
|
||||||
php artisan migrate:refresh --env unittest
|
php artisan migrate:refresh --env unittest
|
||||||
|
|
||||||
|
.PHONY: tests
|
||||||
tests: test
|
tests: test
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
echo "" > storage/logs/laravel.log
|
@echo "" > storage/logs/laravel.log
|
||||||
-vendor/bin/phpunit --testdox tests
|
@chmod 0777 storage/logs/*
|
||||||
cat storage/logs/laravel.log
|
@vendor/bin/phpunit --testdox tests
|
||||||
|
@cat storage/logs/laravel.log
|
||||||
|
|
||||||
.PHONY: schema
|
.PHONY: schema
|
||||||
schema:
|
schema:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ return [
|
|||||||
'env' => env('APP_ENV', 'dev'),
|
'env' => env('APP_ENV', 'dev'),
|
||||||
'debug' => env('APP_DEBUG', true),
|
'debug' => env('APP_DEBUG', true),
|
||||||
'url' => env('APP_URL', 'http://localhost'),
|
'url' => env('APP_URL', 'http://localhost'),
|
||||||
'version' => '2.0',
|
'version' => '4.0',
|
||||||
|
|
||||||
'timezone' => env('APP_TIMEZONE', 'UTC'),
|
'timezone' => env('APP_TIMEZONE', 'UTC'),
|
||||||
'locale' => env('APP_LOCALE', 'en'),
|
'locale' => env('APP_LOCALE', 'en'),
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<phpunit backupGlobals="false"
|
<phpunit backupGlobals="false"
|
||||||
backupStaticAttributes="false"
|
backupStaticAttributes="false"
|
||||||
bootstrap="bootstrap/autoload.php"
|
bootstrap="bootstrap/autoload.php"
|
||||||
colors="true"
|
colors="true" verbose="true"
|
||||||
convertErrorsToExceptions="true"
|
convertErrorsToExceptions="true"
|
||||||
convertNoticesToExceptions="true"
|
convertNoticesToExceptions="true"
|
||||||
convertWarningsToExceptions="true"
|
convertWarningsToExceptions="true"
|
||||||
@@ -22,10 +22,12 @@
|
|||||||
<env name="APP_ENV" value="testing"/>
|
<env name="APP_ENV" value="testing"/>
|
||||||
<env name="APP_KEY" value="base64:ve66Z5Kt/zTN3p++0zOPu854PHfZkwJE5VuoFAlzHtI="/>
|
<env name="APP_KEY" value="base64:ve66Z5Kt/zTN3p++0zOPu854PHfZkwJE5VuoFAlzHtI="/>
|
||||||
<env name="APP_DEBUG" value="true"/>
|
<env name="APP_DEBUG" value="true"/>
|
||||||
|
<env name="APP_LOG_LEVEL" value="debug"/>
|
||||||
<env name="DB_CONNECTION" value="unittest"/>
|
<env name="DB_CONNECTION" value="unittest"/>
|
||||||
<env name="CACHE_DRIVER" value="array"/>
|
<env name="CACHE_DRIVER" value="array"/>
|
||||||
<env name="SESSION_DRIVER" value="array"/>
|
<env name="SESSION_DRIVER" value="array"/>
|
||||||
<env name="QUEUE_DRIVER" value="sync"/>
|
<env name="QUEUE_DRIVER" value="sync"/>
|
||||||
|
<ini name="error_reporting" value="E_ALL" />
|
||||||
<ini name="display_errors" value="On" />
|
<ini name="display_errors" value="On" />
|
||||||
<ini name="display_startup_errors" value="On" />
|
<ini name="display_startup_errors" value="On" />
|
||||||
</php>
|
</php>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class AircraftTest extends TestCase
|
|||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->addData('aircraft_test');
|
$this->addData('aircraft');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getAircraftClass()
|
protected function getAircraftClass()
|
||||||
@@ -44,7 +44,7 @@ class AircraftTest extends TestCase
|
|||||||
return $this->findByICAO($this->ICAO);
|
return $this->findByICAO($this->ICAO);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testAircraftFaresNoOverride()
|
public function XtestAircraftFaresNoOverride()
|
||||||
{
|
{
|
||||||
$this->markTestIncomplete(
|
$this->markTestIncomplete(
|
||||||
'This test has not been implemented yet.'
|
'This test has not been implemented yet.'
|
||||||
@@ -82,7 +82,7 @@ class AircraftTest extends TestCase
|
|||||||
$this->assertCount(0, $fare_svc->getForAircraft($aircraft));
|
$this->assertCount(0, $fare_svc->getForAircraft($aircraft));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testAircraftFaresOverride()
|
public function XtestAircraftFaresOverride()
|
||||||
{
|
{
|
||||||
$this->markTestSkipped(
|
$this->markTestSkipped(
|
||||||
'This test has not been implemented yet.'
|
'This test has not been implemented yet.'
|
||||||
@@ -125,7 +125,7 @@ class AircraftTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @expectedException Exception
|
* @expectedException Exception
|
||||||
*/
|
*/
|
||||||
public function testAircraftMissingField()
|
public function XtestAircraftMissingField()
|
||||||
{
|
{
|
||||||
$this->markTestSkipped(
|
$this->markTestSkipped(
|
||||||
'This test has not been implemented yet.'
|
'This test has not been implemented yet.'
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class FlightTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* mainly to test the model relationships work correctly
|
* mainly to test the model relationships work correctly
|
||||||
*/
|
*/
|
||||||
public function testAddFlight()
|
public function XtestAddFlight()
|
||||||
{
|
{
|
||||||
$this->markTestSkipped(
|
$this->markTestSkipped(
|
||||||
'This test has not been implemented yet.'
|
'This test has not been implemented yet.'
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ use App\Models\Pirep;
|
|||||||
|
|
||||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
|
||||||
|
|
||||||
class PIREPTest extends TestCase
|
class PIREPTest extends TestCase
|
||||||
{
|
{
|
||||||
use WithoutMiddleware;
|
use WithoutMiddleware;
|
||||||
|
#use DatabaseMigrations;
|
||||||
|
|
||||||
protected $pirepSvc;
|
protected $pirepSvc;
|
||||||
protected $SAMPLE_PIREP
|
protected $SAMPLE_PIREP
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ abstract class TestCase extends Illuminate\Foundation\Testing\TestCase
|
|||||||
parent::__construct($name, $data, $dataName);
|
parent::__construct($name, $data, $dataName);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function reset_db(){
|
protected function reset_db() {
|
||||||
exec('make -f ' . __DIR__ . '/../Makefile unittest-db');
|
exec('make -f ' . __DIR__ . '/../Makefile unittest-db');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user