PHP Class Artesaos\Defender\Testing\AbstractTestCase

Inheritance: extends Orchestra\Testbench\TestCase
Datei anzeigen Open project: artesaos/defender Class Usage Examples

Protected Properties

Property Type Description
$providers array Array of service providers should be loaded before tests.
$skipProvidersFor array Array of test case which should not load the service providers.

Public Methods

Method Description
assertUsingTrait ( string $trait, mixed $instance ) Assert if the instance or classname uses a trait.
migrate ( string | array $path = null ) Performs migrations.
resourcePath ( string $path = null ) : string Get the resources path.
seed ( string | array $seeder = 'DatabaseSeeder' ) Seed database.
srcPath ( string $path = null ) : string Get source package path.
stubsPath ( string $path = null ) : string Stubs path.

Protected Methods

Method Description
getEnvironmentSetUp ( Illuminate\Foundation\Application $app ) : void Define environment setup.
getPackageProviders ( Illuminate\Foundation\Application $app ) : array Get package providers.
parseSubPath ( string $path ) : string Trim slashes of path and return prefixed by DIRECTORY_SEPARATOR.

Method Details

assertUsingTrait() public method

Assert if the instance or classname uses a trait.
public assertUsingTrait ( string $trait, mixed $instance )
$trait string Name of the trait (namespaced)
$instance mixed Instance or name of the class

getEnvironmentSetUp() protected method

Define environment setup.
protected getEnvironmentSetUp ( Illuminate\Foundation\Application $app ) : void
$app Illuminate\Foundation\Application
return void

getPackageProviders() protected method

Get package providers.
protected getPackageProviders ( Illuminate\Foundation\Application $app ) : array
$app Illuminate\Foundation\Application
return array

migrate() public method

Performs migrations.
public migrate ( string | array $path = null )
$path string | array string or array of paths to find migrations.

parseSubPath() protected method

Trim slashes of path and return prefixed by DIRECTORY_SEPARATOR.
protected parseSubPath ( string $path ) : string
$path string
return string

resourcePath() public method

Get the resources path.
public resourcePath ( string $path = null ) : string
$path string
return string

seed() public method

Seed database.
public seed ( string | array $seeder = 'DatabaseSeeder' )
$seeder string | array String or Array of classes to seed.

srcPath() public method

Get source package path.
public srcPath ( string $path = null ) : string
$path string
return string

stubsPath() public method

Stubs path.
public stubsPath ( string $path = null ) : string
$path string
return string

Property Details

$providers protected_oe property

Array of service providers should be loaded before tests.
protected array $providers
return array

$skipProvidersFor protected_oe property

Array of test case which should not load the service providers.
protected array $skipProvidersFor
return array