File tree 3 files changed +14
-6
lines changed
3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 19
19
- 7.3
20
20
- 7.4
21
21
- 8.0
22
+ - 8.1
23
+ - 8.2
24
+ - 8.3
22
25
23
26
env :
24
27
EXECUTE_COVERAGE : ${{ matrix.php-version == '8.0' }}
Original file line number Diff line number Diff line change 4
4
5
5
class TestCase extends \Orchestra \Testbench \TestCase
6
6
{
7
+ // The TestCase::__construct in the new PHPUnit versions requires first argument,
8
+ // this workaround allows to instantiate test files in the tests.
9
+ public function __construct ($ name = null )
10
+ {
11
+ parent ::__construct ($ name ?? get_class ($ this ));
12
+ }
7
13
}
Original file line number Diff line number Diff line change 10
10
11
11
class CardTest extends TestCase
12
12
{
13
- /** @test @dataProvider badStrings **/
14
- public function it_expects_card_number ($ input )
13
+ public function it_expects_card_number ()
15
14
{
16
15
$ this ->expectException (CreditCardException::class);
17
-
18
- Factory::makeFromNumber ($ input );
16
+ Factory::makeFromNumber (null );
19
17
}
20
18
21
- public function badStrings ()
19
+ public function it_expects_not_empty_card_number ()
22
20
{
23
- return ['empty string ' => ['' ], 'null ' => [null ]];
21
+ $ this ->expectException (CreditCardException::class);
22
+ Factory::makeFromNumber ('' );
24
23
}
25
24
26
25
/** @test **/
You can’t perform that action at this time.
0 commit comments