PHP 클래스 Laravel\Lumen\Testing\TestCase

상속: extends PHPUnit_Framework_TestCas\PHPUnit_Framework_TestCase, use trait Laravel\Lumen\Testing\Concerns\MakesHttpRequests
파일 보기 프로젝트 열기: laravel/lumen-framework 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$app Laravel\Lumen\Application The application instance.
$baseUrl string The base URL to use while testing the application.
$beforeApplicationDestroyedCallbacks array The callbacks that should be run before the application is destroyed.

공개 메소드들

메소드 설명
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 | null $driver = null ) : void Set the currently logged in user for the application.
createApplication ( ) : Symfony\Component\HttpKernel\HttpKernelInterface Creates the application.
expectsEvents ( array | string $events ) Specify a list of events that should be fired for the given operation.
setUp ( ) : void Setup the test environment.
tearDown ( ) : void Clean up the testing environment before the next test.

보호된 메소드들

메소드 설명
beforeApplicationDestroyed ( callable $callback ) : void Register a callback to be run before the application is destroyed.
expectsJobs ( array | string $jobs ) Specify a list of jobs that should be dispatched for the given operation.
missingFromDatabase ( string $table, array $data, string | null $onConnection = null ) Assert that a given where condition does not exist in the database.
notSeeInDatabase ( string $table, array $data, string | null $onConnection = null ) Assert that a given where condition does not exist in the database.
refreshApplication ( ) : void Refresh the application instance.
seeInDatabase ( string $table, array $data, string | null $onConnection = null ) Assert that a given where condition exists in the database.
setUpTraits ( ) : void Boot the testing helper traits.
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 | null $driver = null ) : void
$user Illuminate\Contracts\Auth\Authenticatable
$driver string | null
리턴 void

beforeApplicationDestroyed() 보호된 메소드

Register a callback to be run before the application is destroyed.
protected beforeApplicationDestroyed ( callable $callback ) : void
$callback callable
리턴 void

createApplication() 추상적인 공개 메소드

Needs to be implemented by subclasses.
abstract public createApplication ( ) : Symfony\Component\HttpKernel\HttpKernelInterface
리턴 Symfony\Component\HttpKernel\HttpKernelInterface

expectsEvents() 공개 메소드

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

expectsJobs() 보호된 메소드

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

missingFromDatabase() 보호된 메소드

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

notSeeInDatabase() 보호된 메소드

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

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, string | null $onConnection = null )
$table string
$data array
$onConnection string | null

setUp() 공개 메소드

Setup the test environment.
public setUp ( ) : void
리턴 void

setUpTraits() 보호된 메소드

Boot the testing helper traits.
protected setUpTraits ( ) : void
리턴 void

tearDown() 공개 메소드

Clean up the testing environment before the next test.
public tearDown ( ) : void
리턴 void

withoutEvents() 보호된 메소드

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

프로퍼티 상세

$app 보호되어 있는 프로퍼티

The application instance.
protected Application,Laravel\Lumen $app
리턴 Laravel\Lumen\Application

$baseUrl 보호되어 있는 프로퍼티

The base URL to use while testing the application.
protected string $baseUrl
리턴 string

$beforeApplicationDestroyedCallbacks 보호되어 있는 프로퍼티

The callbacks that should be run before the application is destroyed.
protected array $beforeApplicationDestroyedCallbacks
리턴 array