Fix tests for 5.8

This commit is contained in:
Nabeel Shahzad
2019-05-12 10:50:38 -05:00
parent 7f0fb16dc3
commit 87aa6ed1da
13 changed files with 19 additions and 22 deletions

View File

@@ -11,7 +11,7 @@ class AcarsTest extends TestCase
{
protected $settingsRepo;
public function setUp()
public function setUp(): void
{
parent::setUp();
$this->addData('base');

View File

@@ -9,7 +9,7 @@ use App\Services\FareService;
*/
class ApiTest extends TestCase
{
public function setUp()
public function setUp(): void
{
parent::setUp();
$this->addData('base');

View File

@@ -7,7 +7,7 @@ class AwardsTest extends TestCase
private $awardSvc;
private $pirepSvc;
public function setUp()
public function setUp(): void
{
parent::setUp();
$this->awardSvc = app(\App\Services\AwardService::class);

View File

@@ -21,7 +21,7 @@ class FinanceTest extends TestCase
/**
* @throws Exception
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
$this->addData('base');

View File

@@ -12,7 +12,7 @@ class FlightTest extends TestCase
protected $flightSvc;
protected $settingsRepo;
public function setUp()
public function setUp(): void
{
parent::setUp();
$this->addData('base');

View File

@@ -12,7 +12,7 @@ class ImporterTest extends TestCase
private $importSvc;
private $fareSvc;
public function setUp()
public function setUp(): void
{
parent::setUp();
$this->importBaseClass = new \App\Interfaces\ImportExport();

View File

@@ -4,10 +4,6 @@ use App\Support\Math;
class MathTest extends TestCase
{
public function setUp()
{
}
/**
* Test adding/subtracting a percentage
*/

View File

@@ -10,9 +10,9 @@ class MetarTest extends TestCase
{
private $settingsRepo;
public function setUp()
public function setUp(): void
{
parent::setUp(); // TODO: Change the autogenerated stub
parent::setUp();
$this->settingsRepo = app(SettingRepository::class);
}

View File

@@ -15,9 +15,9 @@ class PIREPTest extends TestCase
protected $pirepSvc;
protected $settingsRepo;
public function setUp()
public function setUp(): void
{
parent::setUp(); // TODO: Change the autogenerated stub
parent::setUp();
$this->addData('base');
$this->pirepSvc = app('App\Services\PirepService');

View File

@@ -6,7 +6,7 @@ class SubfleetTest extends TestCase
protected $ac_svc;
protected $ICAO = 'B777';
public function setUp()
public function setUp(): void
{
parent::setUp();
$this->addData('base');

View File

@@ -19,7 +19,7 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
protected $app;
protected $baseUrl = 'http://localhost';
protected $connectionsToTransact = ['testing'];
protected $connectionsToTransact = ['test'];
protected $user;
@@ -30,13 +30,18 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
/**
* @throws Exception
*/
public function setUp()
public function setUp() : void
{
parent::setUp();
Artisan::call('database:create', ['--reset' => true]);
Artisan::call('migrate:refresh', ['--env' => 'unittest']);
}
public function tearDown() : void
{
parent::tearDown();
}
/**
* Creates the application. Required to be implemented
*

View File

@@ -8,7 +8,7 @@ class UserTest extends TestCase
protected $settingsRepo;
protected $userSvc;
public function setUp()
public function setUp(): void
{
parent::setUp();
$this->userSvc = app(UserService::class);

View File

@@ -4,10 +4,6 @@ use App\Facades\Utils;
class UtilsTest extends TestCase
{
public function setUp()
{
}
public function testDates()
{
$carbon = new \Carbon\Carbon('2018-04-28T12:55:40Z');