File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 strategy :
99 max-parallel : 5
1010 matrix :
11- php-versions : [ '7.3 ', '7.4 ' ]
11+ php-versions : [ '8.0 ', '8.1', '8.2 ' ]
1212
1313 steps :
1414 - uses : actions/checkout@v1
1818
1919 - name : phpunit
2020 run : |
21- composer test
21+ composer test
Original file line number Diff line number Diff line change 44.idea
55.php_cs.cache
66composer.lock
7+ .php-cs-fixer.cache
8+ .phpunit.result.cache
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ $ finder = (new PhpCsFixer \Finder ())
4+ ->in (__DIR__ )
5+ ->exclude ('vendor ' );
6+
7+ return (new PhpCsFixer \Config ())
8+ ->setRules ([
9+ '@PSR12 ' => true ,
10+ 'strict_param ' => true ,
11+ 'array_syntax ' => ['syntax ' => 'short ' ],
12+ '@PHP80Migration:risky ' => true ,
13+ ])
14+ ->setRiskyAllowed (true )
15+ ->setFinder ($ finder )
16+ ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 99 }
1010 ],
1111 "require" : {
12- "php" : " >=7.3 " ,
12+ "php" : " >=8.0 " ,
1313 "ext-json" : " *" ,
1414 "guzzlehttp/guzzle" : " ~7.0"
1515 },
1616 "require-dev" : {
17- "phpunit/phpunit" : " ^5.7" ,
18- "fabpot/php-cs-fixer" : " ^2.10"
17+ "phpunit/phpunit" : " ^9.6" ,
18+ "friendsofphp/php-cs-fixer" : " ^3.23" ,
19+ "phpspec/prophecy-phpunit" : " ^2.0"
1920 },
2021 "autoload" : {
2122 "psr-4" : {
2829 }
2930 },
3031 "scripts" : {
31- "test" : " ./vendor/bin/phpunit"
32+ "test" : " ./vendor/bin/phpunit" ,
33+ "cs-fix" : " ./vendor/bin/php-cs-fixer fix"
3234 }
3335}
Original file line number Diff line number Diff line change 77use PHPUnit \Framework \TestCase ;
88use Polidog \Esa \Api ;
99use Polidog \Esa \Client \ClientInterface ;
10+ use Prophecy \PhpUnit \ProphecyTrait ;
1011
11- class ApiTest extends TestCase
12+ final class ApiTest extends TestCase
1213{
14+ use ProphecyTrait;
15+
1316 /**
1417 * @var \Prophecy\Prophecy\ObjectProphecy|ClientInterface
1518 */
Original file line number Diff line number Diff line change 88use PHPUnit \Framework \TestCase ;
99use Polidog \Esa \Client \Authorization ;
1010use Prophecy \Argument ;
11+ use Prophecy \PhpUnit \ProphecyTrait ;
1112use Psr \Http \Message \MessageInterface ;
1213use Psr \Http \Message \RequestInterface ;
1314
14- class AuthorizationTest extends TestCase
15+ final class AuthorizationTest extends TestCase
1516{
17+ use ProphecyTrait;
18+
1619 public function testHandle (): void
1720 {
1821 $ token = 'xxxxxxxxxxxxxxxxxx ' ;
Original file line number Diff line number Diff line change 1010use Polidog \Esa \Client \Client ;
1111use Polidog \Esa \Exception \ClientException ;
1212use Prophecy \Argument ;
13+ use Prophecy \PhpUnit \ProphecyTrait ;
1314use Psr \Http \Message \ResponseInterface ;
1415use Psr \Http \Message \StreamInterface ;
1516
16- class ClientTest extends TestCase
17+ final class ClientTest extends TestCase
1718{
19+ use ProphecyTrait;
20+
1821 public function testFactory (): void
1922 {
2023 $ client = Client::factory ('token ' );
You can’t perform that action at this time.
0 commit comments