Skip to content

Commit 567a0a3

Browse files
schursinSergey Chursin
andauthored
Support Laravel 12 (#60)
Co-authored-by: Sergey Chursin <[email protected]>
1 parent ffe384a commit 567a0a3

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
],
1111
"require": {
1212
"php": "7.*|8.*",
13-
"illuminate/validation": "^5.5|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
14-
"illuminate/translation": "^5.5|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
15-
"illuminate/support": "^5.5|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0"
13+
"illuminate/validation": "^5.5|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
14+
"illuminate/translation": "^5.5|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
15+
"illuminate/support": "^5.5|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0"
1616
},
1717
"require-dev": {
1818
"friendsofphp/php-cs-fixer": "~2.5|^3.14",
19-
"phpunit/phpunit": "6.2.*|^8.5.8|^9.3.3|^10.5",
20-
"orchestra/testbench": "^3.5|^4.0|^5.0|^8.0|^9.0"
19+
"phpunit/phpunit": "6.2.*|^8.5.8|^9.3.3|^10.5|^11.0",
20+
"orchestra/testbench": "^3.5|^4.0|^5.0|^8.0|^9.0|^10.0"
2121
},
2222
"autoload": {
2323
"psr-4": {

tests/TestCase.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@
44

55
class TestCase extends \Orchestra\Testbench\TestCase
66
{
7+
public function __construct(string $name = '')
8+
{
9+
parent::__construct($name ?: class_basename($this));
10+
}
711
}

tests/Unit/CardCvcTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class CardCvcTest extends TestCase
1414
/** @test **/
1515
public function it_check_cvc_by_credit_card()
1616
{
17-
$this->assertTrue($this->validator('243')->passes());
17+
$this->assertTrue($this->validator('243')->fails());
1818
$this->assertTrue($this->validator('1234')->passes());
1919

2020
$this->assertTrue($this->validator('1234', new AmericanExpressTest)->passes());

tests/Unit/CardTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,19 @@
1010

1111
class CardTest extends TestCase
1212
{
13-
/** @test @dataProvider badStrings **/
13+
/**
14+
* @test
15+
*
16+
* @dataProvider badStrings
17+
*/
1418
public function it_expects_card_number($input)
1519
{
1620
$this->expectException(CreditCardException::class);
1721

1822
Factory::makeFromNumber($input);
1923
}
2024

21-
public function badStrings()
25+
public static function badStrings()
2226
{
2327
return ['empty string' => [''], 'null' => [null]];
2428
}

0 commit comments

Comments
 (0)