trait WithHypervelBootstrapFile

Traits

Properties

static protected string|bool|null $cacheApplicationBootstrapFile

Cached application bootstrap file path.

from  InteractsWithTestCase
static protected null|array<class-string, class-string> $cachedTestCaseUses

Cached traits used by test case.

from  InteractsWithTestCase
static protected array<int, array{key: class-string, instance: object}> $testCaseTestingFeatures

Programmatically added class-level testing features.

from  InteractsWithTestCase
static protected array<int, array{key: class-string, instance: object}> $testCaseMethodTestingFeatures

Programmatically added method-level testing features.

from  InteractsWithTestCase

Methods

static bool
usesTestingConcern(string|null $trait = null)

Check if the test case uses a specific trait.

static bool
usesRefreshDatabaseTestingConcern()

Determine if the test case uses refresh-database testing concerns.

static array
cachedUsesForTestCase()

Cache and return traits used by test case.

static void
usesTestingFeature(object $attribute, int $flag = Attribute::TARGET_CLASS)

Programmatically add a testing feature attribute.

static Collection
resolvePhpUnitAttributesForMethod(string $className, string|null $methodName = null)

Resolve PHPUnit method attributes for specific method.

void
setUpTheTestEnvironmentUsingTestCase()

Execute BeforeEach lifecycle attributes.

void
tearDownTheTestEnvironmentUsingTestCase()

Execute AfterEach lifecycle attributes.

static void
setUpBeforeClassUsingTestCase()

Execute BeforeAll lifecycle attributes.

static void
tearDownAfterClassUsingTestCase()

Execute AfterAll lifecycle attributes and clear caches.

string|false
getApplicationBootstrapFile(string $filename)

Get application bootstrap file path (if exists).

bool
hasCustomApplicationKernels()

Determine if application is using a custom application kernels.

bool
usesTestbenchDefaultSkeleton()

Determine if application is bootstrapped using Testbench's default skeleton.

string
getApplicationBasePath()

Get the application's base path.

Details

static bool usesTestingConcern(string|null $trait = null)

Check if the test case uses a specific trait.

Parameters

string|null $trait

Return Value

bool

static bool usesRefreshDatabaseTestingConcern()

Determine if the test case uses refresh-database testing concerns.

Return Value

bool

static array cachedUsesForTestCase()

Cache and return traits used by test case.

Return Value

array

static void usesTestingFeature(object $attribute, int $flag = Attribute::TARGET_CLASS)

Programmatically add a testing feature attribute.

Parameters

object $attribute
int $flag

Return Value

void

abstract static protected Collection resolvePhpUnitAttributesForMethod(string $className, string|null $methodName = null)

Resolve PHPUnit method attributes for specific method.

Parameters

string $className
string|null $methodName

Return Value

Collection

protected void setUpTheTestEnvironmentUsingTestCase()

Execute BeforeEach lifecycle attributes.

Return Value

void

protected void tearDownTheTestEnvironmentUsingTestCase()

Execute AfterEach lifecycle attributes.

Return Value

void

static void setUpBeforeClassUsingTestCase()

Execute BeforeAll lifecycle attributes.

Return Value

void

static void tearDownAfterClassUsingTestCase()

Execute AfterAll lifecycle attributes and clear caches.

Return Value

void

at line 20
protected string|false getApplicationBootstrapFile(string $filename)

internal  
 

Get application bootstrap file path (if exists).

Parameters

string $filename

Return Value

string|false

at line 40
protected bool hasCustomApplicationKernels()

internal  
 

Determine if application is using a custom application kernels.

Return Value

bool

at line 49
protected bool usesTestbenchDefaultSkeleton()

Determine if application is bootstrapped using Testbench's default skeleton.

Return Value

bool

at line 61
abstract protected string getApplicationBasePath()

Get the application's base path.

Return Value

string