Adopt Laravel coding style
Shift automatically applies the Laravel coding style - which uses the PSR-2 coding style as a base with some minor additions. You may customize the adopted coding style by adding your own [PHP CS Fixer][1] `.php_cs` config file to your project root. Feel free to use [Shift's Laravel ruleset][2] to help you get started. [1]: https://github.com/FriendsOfPHP/PHP-CS-Fixer [2]: https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
|
||||
use App\Models\SnipeModel;
|
||||
|
||||
class SnipeModelTest extends BaseTest
|
||||
@@ -11,6 +10,7 @@ class SnipeModelTest extends BaseTest
|
||||
protected $tester;
|
||||
|
||||
// tests
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
@@ -20,7 +20,7 @@ class SnipeModelTest extends BaseTest
|
||||
$c->purchase_date = '';
|
||||
$this->assertTrue($c->purchase_date === null);
|
||||
$c->purchase_date = '2016-03-25 12:35:50';
|
||||
$this->assertTrue($c->purchase_date==='2016-03-25 12:35:50');
|
||||
$this->assertTrue($c->purchase_date === '2016-03-25 12:35:50');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -32,9 +32,9 @@ class SnipeModelTest extends BaseTest
|
||||
$c->purchase_cost = '0.00';
|
||||
$this->assertTrue($c->purchase_cost === null);
|
||||
$c->purchase_cost = '9.54';
|
||||
$this->assertTrue($c->purchase_cost===9.54);
|
||||
$this->assertTrue($c->purchase_cost === 9.54);
|
||||
$c->purchase_cost = '9.50';
|
||||
$this->assertTrue($c->purchase_cost===9.5);
|
||||
$this->assertTrue($c->purchase_cost === 9.5);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -46,8 +46,9 @@ class SnipeModelTest extends BaseTest
|
||||
$c->location_id = '';
|
||||
$this->assertTrue($c->location_id === null);
|
||||
$c->location_id = '5';
|
||||
$this->assertTrue($c->location_id==5);
|
||||
$this->assertTrue($c->location_id == 5);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
@@ -57,7 +58,7 @@ class SnipeModelTest extends BaseTest
|
||||
$c->category_id = '';
|
||||
$this->assertTrue($c->category_id === null);
|
||||
$c->category_id = '1';
|
||||
$this->assertTrue($c->category_id==1);
|
||||
$this->assertTrue($c->category_id == 1);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,7 +70,7 @@ class SnipeModelTest extends BaseTest
|
||||
$c->supplier_id = '';
|
||||
$this->assertTrue($c->supplier_id === null);
|
||||
$c->supplier_id = '4';
|
||||
$this->assertTrue($c->supplier_id==4);
|
||||
$this->assertTrue($c->supplier_id == 4);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,7 +82,7 @@ class SnipeModelTest extends BaseTest
|
||||
$c->depreciation_id = '';
|
||||
$this->assertTrue($c->depreciation_id === null);
|
||||
$c->depreciation_id = '4';
|
||||
$this->assertTrue($c->depreciation_id==4);
|
||||
$this->assertTrue($c->depreciation_id == 4);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,6 +94,6 @@ class SnipeModelTest extends BaseTest
|
||||
$c->manufacturer_id = '';
|
||||
$this->assertTrue($c->manufacturer_id === null);
|
||||
$c->manufacturer_id = '4';
|
||||
$this->assertTrue($c->manufacturer_id==4);
|
||||
$this->assertTrue($c->manufacturer_id == 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user