Свойство | Тип | Описание | |
---|---|---|---|
$responder | An instance of the responder service responsible for generating API responses. | ||
$schema | Illuminate\Database\Schema\Builder | Save an instance of the schema builder for easy access. |
Метод | Описание | |
---|---|---|
setUp ( ) : void | Setup the test environment. |
Метод | Описание | |
---|---|---|
createModel ( array $attributes = [] ) : |
Creates a new adjustable model for testing purposes. | |
createTestController ( ) : Illuminate\Routing\Controller | Creates a controller class with the RespondsWithJson trait. | |
createTestModelWithNoTransformer ( array $attributes = [] ) : |
Creates a new adjustable model without an attached transformer for testing purposes. | |
createTestModelWithNullTransformer ( array $attributes = [] ) : |
Creates a new adjustable model with a null transformer for testing purposes. | |
createTestTransformer ( ) : void | Creates a new transformer for testing purposes. | |
getEnvironmentSetUp ( Illuminate\Foundation\Application $app ) : void | Define environment setup. | |
getPackageProviders ( $app ) : array | Get package service providers. | |
makeModel ( array $attributes = [] ) : |
Makes a new empty model for testing purposes. | |
makeModelWithResourceKey ( string $resourceKey ) : |
Makes a new empty model with a resource key set. | |
makeModelWithTransformer ( $transformer ) : |
Makes a new empty transformable model with a transformer set. | |
makeTransformer ( ) : |
Makes a new transformer for testing purposes. | |
mockBuilder ( array $data = null ) : Mockery\MockInterface | Create a mock of the Eloquent builder with a mock of the [get] method which returns the given data. | |
mockBuilderWithPaginator ( array $data = null ) : Mockery\MockInterface | Create a mock of the Eloquent builder with a mock of the [paginate] method which returns an instance of [\Illuminate\Pagination\LengthAwarePaginator]. | |
mockPivot ( ) : Mockery\MockInterface | Create a mock of a pivot. | |
mockRelation ( |
Create a mock of an Eloquent relationship. | |
mockResourceFactory ( League\Fractal\Resource\ResourceInterface $resource ) : Mockery\MockInterface | Create a mock of a resource factory. | |
mockResponder ( ) : Mockery\MockInterface | Create a mock of the responder and binds it to the service container. | |
mockSuccessBuilder ( ) : Mockery\MockInterface | Create a mock of a success response builder. | |
mockTranslator ( string $message ) : Mockery\MockInterface | Create a mock of Laravel's translator and binds it to the service container. | |
rollbackTestMigrations ( ) : void | Rollback migrations for tables only used for testing purposes. | |
runTestMigrations ( ) : void | Run migrations for tables only used for testing purposes. | |
storeModel ( |
Stores an actual instance of an adjustable model to the database. |
protected createModel ( array $attributes = [] ) : |
||
$attributes | array | |
Результат |
protected createTestController ( ) : Illuminate\Routing\Controller | ||
Результат | Illuminate\Routing\Controller |
protected createTestModelWithNoTransformer ( array $attributes = [] ) : |
||
$attributes | array | |
Результат |
protected createTestModelWithNullTransformer ( array $attributes = [] ) : |
||
$attributes | array | |
Результат |
protected createTestTransformer ( ) : void | ||
Результат | void |
protected getEnvironmentSetUp ( Illuminate\Foundation\Application $app ) : void | ||
$app | Illuminate\Foundation\Application | |
Результат | void |
protected getPackageProviders ( $app ) : array | ||
Результат | array |
protected makeModelWithResourceKey ( string $resourceKey ) : |
||
$resourceKey | string | |
Результат |
protected makeModelWithTransformer ( $transformer ) : |
||
Результат |
protected makeTransformer ( ) : |
||
Результат |
protected mockBuilder ( array $data = null ) : Mockery\MockInterface | ||
$data | array | |
Результат | Mockery\MockInterface |
protected mockBuilderWithPaginator ( array $data = null ) : Mockery\MockInterface | ||
$data | array | |
Результат | Mockery\MockInterface |
protected mockPivot ( ) : Mockery\MockInterface | ||
Результат | Mockery\MockInterface |
protected mockRelation ( |
||
$data | ||
Результат | Mockery\MockInterface |
protected mockResourceFactory ( League\Fractal\Resource\ResourceInterface $resource ) : Mockery\MockInterface | ||
$resource | League\Fractal\Resource\ResourceInterface | |
Результат | Mockery\MockInterface |
protected mockResponder ( ) : Mockery\MockInterface | ||
Результат | Mockery\MockInterface |
protected mockSuccessBuilder ( ) : Mockery\MockInterface | ||
Результат | Mockery\MockInterface |
protected mockTranslator ( string $message ) : Mockery\MockInterface | ||
$message | string | |
Результат | Mockery\MockInterface |
protected rollbackTestMigrations ( ) : void | ||
Результат | void |
protected runTestMigrations ( ) : void | ||
Результат | void |
protected storeModel ( |
||
$model | ||
$attributes | array | |
Результат |
protected Responder,Flugg\Responder $responder | ||
Результат |