PHP Trait Laravel\Lumen\Testing\ApplicationTrait

Afficher le fichier Open project: ctrlaltdylan/MirrorMirror

Protected Properties

Свойство Type Description
$app Laravel\Lumen\Application The application instance.
$code integer The last code returned by artisan cli.

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Method Details

actingAs() public méthode

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() public méthode

Call artisan command and return code.
public artisan ( string $command, array $parameters = [] ) : integer
$command string
$parameters array
Résultat integer

be() public méthode

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
Résultat void

expectsEvents() public méthode

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

expectsJobs() protected méthode

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

flushSession() public méthode

Flush all of the current session data.
public flushSession ( ) : void
Résultat void

missingFromDatabase() protected méthode

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

notSeeInDatabase() protected méthode

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

refreshApplication() protected méthode

Refresh the application instance.
protected refreshApplication ( ) : void
Résultat void

seeInDatabase() protected méthode

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

seed() public méthode

Seed a given database connection.
public seed ( string $class = 'DatabaseSeeder' ) : void
$class string
Résultat void

session() public méthode

Set the session to the given array.
public session ( array $data ) : void
$data array
Résultat void

startSession() protected méthode

Start the session for the application.
protected startSession ( ) : void
Résultat void

withSession() public méthode

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

withoutEvents() protected méthode

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

Property Details

$app protected_oe property

The application instance.
protected Application,Laravel\Lumen $app
Résultat Laravel\Lumen\Application

$code protected_oe property

The last code returned by artisan cli.
protected int $code
Résultat integer