Uses Collision ^7.0

This commit is contained in:
Nuno Maduro
2022-09-15 01:07:15 +01:00
parent eab944023c
commit 3ff95faaaa
47 changed files with 646 additions and 308 deletions

View File

@ -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;