PHP Трейт Laravel\Lumen\Testing\ApplicationTrait

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$app Laravel\Lumen\Application The application instance.
$code integer The last code returned by artisan cli.

Открытые методы

Метод Описание
actingAs ( Illuminate\Contracts\Auth\Authenticatable $user, string | null $driver = null ) Set the currently logged in user for the application.
artisan ( string $command, array $parameters = [] ) : integer Call artisan command and return code.
be ( Illuminate\Contracts\Auth\Authenticatable $user, string $driver = null ) : void Set the currently logged in user for the application.
expectsEvents ( array | dynamic $events ) Specify a list of events that should be fired for the given operation.
flushSession ( ) : void Flush all of the current session data.
seed ( string $class = 'DatabaseSeeder' ) : void Seed a given database connection.
session ( array $data ) : void Set the session to the given array.
withSession ( array $data ) Set the session to the given array.

Защищенные методы

Метод Описание
expectsJobs ( array | dynamic $jobs ) Specify a list of jobs that should be dispatched for the given operation.
missingFromDatabase ( string $table, array $data ) Assert that a given where condition does not exist in the database.
notSeeInDatabase ( string $table, array $data ) Assert that a given where condition does not exist in the database.
refreshApplication ( ) : void Refresh the application instance.
seeInDatabase ( string $table, array $data ) Assert that a given where condition exists in the database.
startSession ( ) : void Start the session for the application.
withoutEvents ( ) Mock the event dispatcher so all events are silenced.

Описание методов

actingAs() публичный Метод

Set the currently logged in user for the application.
public actingAs ( Illuminate\Contracts\Auth\Authenticatable $user, string | null $driver = null )
$user Illuminate\Contracts\Auth\Authenticatable
$driver string | null

artisan() публичный Метод

Call artisan command and return code.
public artisan ( string $command, array $parameters = [] ) : integer
$command string
$parameters array
Результат integer

be() публичный Метод

Set the currently logged in user for the application.
public be ( Illuminate\Contracts\Auth\Authenticatable $user, string $driver = null ) : void
$user Illuminate\Contracts\Auth\Authenticatable
$driver string
Результат void

expectsEvents() публичный Метод

These events will be mocked, so that handlers will not actually be executed.
public expectsEvents ( array | dynamic $events )
$events array | dynamic

expectsJobs() защищенный Метод

These jobs will be mocked, so that handlers will not actually be executed.
protected expectsJobs ( array | dynamic $jobs )
$jobs array | dynamic

flushSession() публичный Метод

Flush all of the current session data.
public flushSession ( ) : void
Результат void

missingFromDatabase() защищенный Метод

Assert that a given where condition does not exist in the database.
protected missingFromDatabase ( string $table, array $data )
$table string
$data array

notSeeInDatabase() защищенный Метод

Assert that a given where condition does not exist in the database.
protected notSeeInDatabase ( string $table, array $data )
$table string
$data array

refreshApplication() защищенный Метод

Refresh the application instance.
protected refreshApplication ( ) : void
Результат void

seeInDatabase() защищенный Метод

Assert that a given where condition exists in the database.
protected seeInDatabase ( string $table, array $data )
$table string
$data array

seed() публичный Метод

Seed a given database connection.
public seed ( string $class = 'DatabaseSeeder' ) : void
$class string
Результат void

session() публичный Метод

Set the session to the given array.
public session ( array $data ) : void
$data array
Результат void

startSession() защищенный Метод

Start the session for the application.
protected startSession ( ) : void
Результат void

withSession() публичный Метод

Set the session to the given array.
public withSession ( array $data )
$data array

withoutEvents() защищенный Метод

Mock the event dispatcher so all events are silenced.
protected withoutEvents ( )

Описание свойств

$app защищенное свойство

The application instance.
protected Application,Laravel\Lumen $app
Результат Laravel\Lumen\Application

$code защищенное свойство

The last code returned by artisan cli.
protected int $code
Результат integer