mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Uses Collision ^7.0
This commit is contained in:
@ -20,7 +20,8 @@ it('does not allow to add the same test description twice', function () {
|
||||
it('alerts users about tests with arguments but no input', function () {
|
||||
$testSuite = new TestSuite(getcwd(), 'tests');
|
||||
|
||||
$method = new TestCaseMethodFactory('foo', 'bar', function (int $arg) {});
|
||||
$method = new TestCaseMethodFactory('foo', 'bar', function (int $arg) {
|
||||
});
|
||||
|
||||
$testSuite->tests->set($method);
|
||||
})->throws(
|
||||
@ -29,7 +30,7 @@ it('alerts users about tests with arguments but no input', function () {
|
||||
);
|
||||
|
||||
it('can return an array of all test suite filenames', function () {
|
||||
$testSuite = TestSuite::getInstance(getcwd(), 'tests');
|
||||
$testSuite = new TestSuite(getcwd(), 'tests');
|
||||
|
||||
$testSuite->tests->set(new TestCaseMethodFactory('a', 'b', null));
|
||||
$testSuite->tests->set(new TestCaseMethodFactory('c', 'd', null));
|
||||
@ -57,9 +58,10 @@ it('can filter the test suite filenames to those with the only method', function
|
||||
it('does not filter the test suite filenames to those with the only method when working in CI pipeline', function () {
|
||||
$previousEnvironment = Environment::name();
|
||||
Environment::name(Environment::CI);
|
||||
$testSuite = TestSuite::getInstance(getcwd(), 'tests');
|
||||
$testSuite = new TestSuite(getcwd(), 'tests');
|
||||
|
||||
$test = function () {};
|
||||
$test = function () {
|
||||
};
|
||||
|
||||
$testWithOnly = new TestCaseMethodFactory('a', 'b', null);
|
||||
$testWithOnly->only = true;
|
||||
|
||||
Reference in New Issue
Block a user