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; protected $settingsRepo;
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->addData('base'); $this->addData('base');

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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