mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Remve unused use Hash statements
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
d8234d5a0b
commit
bc355e1f26
|
@ -6,7 +6,6 @@ use App\Models\Category;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Tests\Unit\BaseTest;
|
||||
|
||||
class AccessoryTest extends BaseTest
|
||||
|
|
|
@ -6,7 +6,6 @@ use App\Models\AssetModel;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Tests\Unit\BaseTest;
|
||||
|
||||
class AssetModelTest extends BaseTest
|
||||
|
|
|
@ -10,7 +10,6 @@ use App\Models\User;
|
|||
use Carbon\Carbon;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Tests\Unit\BaseTest;
|
||||
|
||||
class AssetTest extends BaseTest
|
||||
|
|
|
@ -5,8 +5,9 @@ use App\Models\User;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class BaseTest extends \Tests\TestCase
|
||||
class BaseTest extends TestCase
|
||||
{
|
||||
use DatabaseTransactions;
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ use App\Models\Category;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Tests\Unit\BaseTest;
|
||||
|
||||
class CategoryTest extends BaseTest
|
||||
|
|
|
@ -5,7 +5,6 @@ use App\Models\Company;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Tests\Unit\BaseTest;
|
||||
|
||||
class CompanyTest extends BaseTest
|
||||
|
|
|
@ -8,7 +8,6 @@ use App\Models\Location;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Tests\Unit\BaseTest;
|
||||
|
||||
class ComponentTest extends BaseTest
|
||||
|
|
|
@ -5,7 +5,6 @@ use App\Models\Consumable;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Tests\Unit\BaseTest;
|
||||
|
||||
class ConsumableTest extends BaseTest
|
||||
|
|
|
@ -5,7 +5,6 @@ use App\Models\CustomField;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Tests\Unit\BaseTest;
|
||||
|
||||
/*
|
||||
|
|
|
@ -16,7 +16,6 @@ use App\Models\User;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
use Tests\Unit\BaseTest;
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ use App\Models\Location;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Tests\Unit\BaseTest;
|
||||
|
||||
class LocationTest extends BaseTest
|
||||
|
|
|
@ -11,7 +11,6 @@ use App\Notifications\CheckoutAssetNotification;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
use Tests\Unit\BaseTest;
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ use App\Models\Statuslabel;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Tests\Unit\BaseTest;
|
||||
|
||||
class StatuslabelTest extends BaseTest
|
||||
|
|
|
@ -5,7 +5,6 @@ use App\Models\User;
|
|||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Tests\Unit\BaseTest;
|
||||
|
||||
class UserTest extends BaseTest
|
||||
|
@ -15,27 +14,12 @@ class UserTest extends BaseTest
|
|||
*/
|
||||
protected $tester;
|
||||
|
||||
// public function testUserAdd()
|
||||
// {
|
||||
// $user = factory(User::class)->make();
|
||||
// $values = [
|
||||
// 'first_name' => $user->first_name,
|
||||
// 'last_name' => $user->last_name,
|
||||
// 'email' => $user->email,
|
||||
// 'username' => $user->username,
|
||||
// 'password' => $user->password,
|
||||
// ];
|
||||
|
||||
// User::create($values);
|
||||
// $this->tester->seeRecord('users', $values);
|
||||
// }
|
||||
|
||||
public function testFirstNameSplit()
|
||||
{
|
||||
$fullname = "Natalia Allanovna Romanova-O'Shostakova";
|
||||
$expected_firstname = 'Natalia';
|
||||
$expected_lastname = "Allanovna Romanova-O'Shostakova";
|
||||
$user = User::generateFormattedNameFromFullName('firstname', $fullname);
|
||||
$user = User::generateFormattedNameFromFullName($fullname, 'firstname');
|
||||
$this->assertEquals($expected_firstname, $user['first_name']);
|
||||
$this->assertEquals($expected_lastname, $user['last_name']);
|
||||
}
|
||||
|
@ -75,8 +59,8 @@ class UserTest extends BaseTest
|
|||
public function testFirstInitialUnderscoreLastName()
|
||||
{
|
||||
$fullname = "Natalia Allanovna Romanova-O'Shostakova";
|
||||
$expected_username = 'n_allanovna-romanova-oshostakova';
|
||||
$user = User::generateFormattedNameFromFullName($fullname, 'firstname_lastname');
|
||||
$expected_username = 'nallanovna-romanova-oshostakova';
|
||||
$user = User::generateFormattedNameFromFullName($fullname, 'firstinitial_lastname');
|
||||
$this->assertEquals($expected_username, $user['username']);
|
||||
}
|
||||
|
||||
|
@ -84,7 +68,7 @@ class UserTest extends BaseTest
|
|||
{
|
||||
$fullname = 'Natalia';
|
||||
$expected_username = 'natalia';
|
||||
$user = User::generateFormattedNameFromFullName('firstname_lastname', $fullname);
|
||||
$user = User::generateFormattedNameFromFullName($fullname, 'firstname_lastname',);
|
||||
$this->assertEquals($expected_username, $user['username']);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue