first commit
This commit is contained in:
43
tests/Facades/IntervalFactory.php
Normal file
43
tests/Facades/IntervalFactory.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Facades;
|
||||
|
||||
use App\Models\Task;
|
||||
use App\Models\TimeInterval;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
use Tests\Factories\IntervalFactory as BaseIntervalFactory;
|
||||
|
||||
/**
|
||||
* @method static TimeInterval create(array $attributes = [])
|
||||
* @method static Collection createMany(int $amount = 1)
|
||||
* @method static array createRandomModelData()
|
||||
* @method static array createRandomModelDataWithRelation()
|
||||
* @method static array createRandomManualModelDataWithRelations()
|
||||
* @method static BaseIntervalFactory forUser(User $user)
|
||||
* @method static BaseIntervalFactory forTask(Task $task)
|
||||
* @method static BaseIntervalFactory withRandomRelations()
|
||||
*/
|
||||
class IntervalFactory extends Facade
|
||||
{
|
||||
/**
|
||||
* Get the registered name of the component.
|
||||
*/
|
||||
protected static function getFacadeAccessor(): string
|
||||
{
|
||||
return BaseIntervalFactory::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve a new instance for the facade
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function refresh()
|
||||
{
|
||||
static::clearResolvedInstance(static::getFacadeAccessor());
|
||||
|
||||
return static::getFacadeRoot();
|
||||
}
|
||||
}
|
||||
32
tests/Facades/InvitationFactory.php
Normal file
32
tests/Facades/InvitationFactory.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Facades;
|
||||
|
||||
use App\Models\Invitation;
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
use Tests\Factories\InvitationFactory as BaseInvitationFactory;
|
||||
|
||||
/**
|
||||
* @method static Invitation create(array $attributes = [])
|
||||
* @method static array createRandomModelData()
|
||||
* @method static array createRequestData()
|
||||
*/
|
||||
class InvitationFactory extends Facade
|
||||
{
|
||||
protected static function getFacadeAccessor(): string
|
||||
{
|
||||
return BaseInvitationFactory::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve a new instance for the facade
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function refresh()
|
||||
{
|
||||
static::clearResolvedInstance(static::getFacadeAccessor());
|
||||
|
||||
return static::getFacadeRoot();
|
||||
}
|
||||
}
|
||||
39
tests/Facades/ProjectFactory.php
Normal file
39
tests/Facades/ProjectFactory.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Facades;
|
||||
|
||||
use App\Models\Project;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
use Tests\Factories\ProjectFactory as BaseProjectFactory;
|
||||
|
||||
/**
|
||||
* @method static Project create(array $attributes = [])
|
||||
* @method static Collection createMany(int $amount = 1)
|
||||
* @method static array createRandomModelData()
|
||||
* @method static BaseProjectFactory withTasks(int $quantity = 1)
|
||||
* @method static BaseProjectFactory forUsers(array $users)
|
||||
* @method static BaseProjectFactory createTasks(Project $project)
|
||||
*/
|
||||
class ProjectFactory extends Facade
|
||||
{
|
||||
/**
|
||||
* Get the registered name of the component.
|
||||
*/
|
||||
protected static function getFacadeAccessor(): string
|
||||
{
|
||||
return BaseProjectFactory::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve a new instance for the facade
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function refresh()
|
||||
{
|
||||
static::clearResolvedInstance(static::getFacadeAccessor());
|
||||
|
||||
return static::getFacadeRoot();
|
||||
}
|
||||
}
|
||||
39
tests/Facades/ProjectUserFactory.php
Normal file
39
tests/Facades/ProjectUserFactory.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Facades;
|
||||
|
||||
use App\Models\ProjectsUsers;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
use Tests\Factories\ProjectUserFactory as BaseProjectUserFactory;
|
||||
|
||||
/**
|
||||
* @method static ProjectsUsers create(array $attributes = [])
|
||||
* @method static BaseProjectUserFactory forUser(User $user)
|
||||
* @method static BaseProjectUserFactory setRole(int $roleId)
|
||||
* @method static Collection createMany(int $amount = 1)
|
||||
* @method static array createRandomModelData()
|
||||
*/
|
||||
class ProjectUserFactory extends Facade
|
||||
{
|
||||
/**
|
||||
* Get the registered name of the component.
|
||||
*/
|
||||
protected static function getFacadeAccessor(): string
|
||||
{
|
||||
return BaseProjectUserFactory::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve a new instance for the facade
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function refresh()
|
||||
{
|
||||
static::clearResolvedInstance(static::getFacadeAccessor());
|
||||
|
||||
return static::getFacadeRoot();
|
||||
}
|
||||
}
|
||||
40
tests/Facades/ScreenshotFactory.php
Normal file
40
tests/Facades/ScreenshotFactory.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Facades;
|
||||
|
||||
use App\Models\Screenshot;
|
||||
use App\Models\TimeInterval;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
use Tests\Factories\ScreenshotFactory as BaseScreenshotFactory;
|
||||
|
||||
/**
|
||||
* @method static Screenshot create(array $attributes = [])
|
||||
* @method static array createRandomModelData()
|
||||
* @method static Collection createMany(int $amount = 1)
|
||||
* @method static BaseScreenshotFactory withRandomRelations()
|
||||
* @method static BaseScreenshotFactory forInterval(TimeInterval $interval)
|
||||
* @method static BaseScreenshotFactory fake()
|
||||
*/
|
||||
class ScreenshotFactory extends Facade
|
||||
{
|
||||
/**
|
||||
* Get the registered name of the component.
|
||||
*/
|
||||
protected static function getFacadeAccessor(): string
|
||||
{
|
||||
return BaseScreenshotFactory::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve a new instance for the facade
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function refresh()
|
||||
{
|
||||
static::clearResolvedInstance(static::getFacadeAccessor());
|
||||
|
||||
return static::getFacadeRoot();
|
||||
}
|
||||
}
|
||||
39
tests/Facades/TaskFactory.php
Normal file
39
tests/Facades/TaskFactory.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Facades;
|
||||
|
||||
use App\Models\Task;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
use Tests\Factories\TaskFactory as BaseTaskFactory;
|
||||
|
||||
/**
|
||||
* @method static Task create(array $attributes = [])
|
||||
* @method static Collection createMany(int $amount = 1)
|
||||
* @method static BaseTaskFactory forUser(User $user)
|
||||
* @method static array createRandomModelData()
|
||||
* @method static BaseTaskFactory withIntervals(int $quantity = 1)
|
||||
*/
|
||||
class TaskFactory extends Facade
|
||||
{
|
||||
/**
|
||||
* Get the registered name of the component.
|
||||
*/
|
||||
protected static function getFacadeAccessor(): string
|
||||
{
|
||||
return BaseTaskFactory::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve a new instance for the facade
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function refresh()
|
||||
{
|
||||
static::clearResolvedInstance(static::getFacadeAccessor());
|
||||
|
||||
return static::getFacadeRoot();
|
||||
}
|
||||
}
|
||||
40
tests/Facades/UserFactory.php
Normal file
40
tests/Facades/UserFactory.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Facades;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
use Tests\Factories\UserFactory as BaseUserFactory;
|
||||
|
||||
/**
|
||||
* @method static User create()
|
||||
* @method static Collection createMany(int $amount = 1)
|
||||
* @method static BaseUserFactory withTokens(int $amount = 1)
|
||||
* @method static BaseUserFactory asAdmin()
|
||||
* @method static BaseUserFactory asUser()
|
||||
* @method static array createRandomModelData()
|
||||
* @method static array createRandomRegistrationModelData()
|
||||
*/
|
||||
class UserFactory extends Facade
|
||||
{
|
||||
/**
|
||||
* Get the registered name of the component.
|
||||
*/
|
||||
protected static function getFacadeAccessor(): string
|
||||
{
|
||||
return BaseUserFactory::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve a new instance for the facade
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function refresh()
|
||||
{
|
||||
static::clearResolvedInstance(static::getFacadeAccessor());
|
||||
|
||||
return static::getFacadeRoot();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user