Test
class Test
Supports unit test related console commands.
Constants
| ALLOWED_OPTIONS |
The array of options allowed as input for the test command. |
| FEATURE_PATH |
The path for feature tests. |
| UNIT_PATH |
The path for unit tests. |
Properties
| string | $inputOptions | A string of input options provided as input when running the test command. |
|
| OutputInterface | $output | The Symfony OutputInterface object. |
Methods
Constructor
Performs all tests.
Returns array containing all filenames in Feature directory.
The template for a new Feature test class that extends ApplicationTestCase.
Creates a new test class. When --feature flag is provided a test feature class is created.
The template for a new Unit Test class that extends TestCase.
Parses PHPUnit related arguments and ignore Symfony arguments.
Runs the unit test contained in the TestCase class.
Supports ability to run test by class name or function name within a class.
Performs testing against a single class within a test suite.
Checks if file exists in either test suite.
Enforces rule that classes/files across test suites should be unique.
Run all test files in an individual test suite.
Determines if execution of a test suite(s) is successful.
Returns array containing all filenames in Unit directory.
Details
at line 70
__construct(InputInterface $input, OutputInterface $output)
Constructor
at line 80
int
allTests()
Performs all tests.
at line 101
static array
featureTests()
Returns array containing all filenames in Feature directory.
at line 111
static string
makeFeatureTest(string $testName)
The template for a new Feature test class that extends ApplicationTestCase.
at line 143
static int
makeTest(string $testName, InputInterface $input)
Creates a new test class. When --feature flag is provided a test feature class is created.
at line 171
static string
makeUnitTest(string $testName)
The template for a new Unit Test class that extends TestCase.
at line 201
static string
parseOptions(InputInterface $input)
Parses PHPUnit related arguments and ignore Symfony arguments.
at line 274
void
runTest(string $tests)
Runs the unit test contained in the TestCase class.
at line 287
int
selectTests(string $testArg)
Supports ability to run test by class name or function name within a class.
at line 334
void
singleFileWithinSuite(string $testArg, string $suite = self::UNIT_PATH)
Performs testing against a single class within a test suite.
at line 350
static bool
testIfExists(string $name)
Checks if file exists in either test suite.
at line 366
static bool
testIfSame(string $name)
Enforces rule that classes/files across test suites should be unique.
at line 381
int
testSuite(array $collection)
Run all test files in an individual test suite.
at line 401
static bool
testSuiteStatus(int|null $featureStatus, int|null $unitStatus)
Determines if execution of a test suite(s) is successful.
at line 411
static array
unitTests()
Returns array containing all filenames in Unit directory.