Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/Foundation/Auth/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
use Illuminate\Database\Eloquent\Model;
use Illuminate\Foundation\Auth\Access\Authorizable;

class User extends Model implements
AuthenticatableContract,
AuthorizableContract,
CanResetPasswordContract
class User extends Model implements AuthenticatableContract, AuthorizableContract, CanResetPasswordContract
{
use Authenticatable;
use Authorizable;
Expand Down
2 changes: 1 addition & 1 deletion tests/ModelWithUuidTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class ModelWithUuidTest extends TestCase
{
/** @test */
public function testModelWithUuid()
public function test_model_with_uuid()
{
/** @var UserWithUuid $testModel */
$testModel = UserWithUuid::query()->first();
Expand Down
4 changes: 3 additions & 1 deletion tests/Models/UserWithUuid.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@

/**
* Class UserWithUuid
* @package Glorand\LaravelEloquentModelUuid\Tests\Models
*
* @property string $id
* @property string $name
*/
class UserWithUuid extends Model
{
protected $table = 'users_with_uuid';

protected $guarded = [];

protected $fillable = ['id', 'name'];
}
6 changes: 3 additions & 3 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

use Glorand\LaravelEloquentModelUuid\Tests\Models\UserWithUuid;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Schema;
use Orchestra\Testbench\TestCase as OrchestraTestCase;
use Illuminate\Support\Arr;

class TestCase extends OrchestraTestCase
{
public function setUp(): void
protected function setUp(): void
{
parent::setUp();

Expand All @@ -37,7 +37,7 @@ protected function createTables(...$tableNames)
{
collect($tableNames)->each(function (string $tableName) {
Schema::create($tableName, function (Blueprint $table) use ($tableName) {
if ('users_with_uuid' === $tableName) {
if ($tableName === 'users_with_uuid') {
$table->uuid('id')->primary();
} else {
$table->primary('id');
Expand Down