Remve unused use Hash statements

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2021-11-30 20:47:02 -08:00
parent d8234d5a0b
commit bc355e1f26
14 changed files with 6 additions and 33 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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;
/*

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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

View file

@ -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']);
}