File tree 10 files changed +45
-35
lines changed
10 files changed +45
-35
lines changed Original file line number Diff line number Diff line change @@ -14,14 +14,14 @@ jobs:
14
14
strategy :
15
15
matrix :
16
16
include :
17
- - php-version : 7.1
18
- symfony-version : 4.4.*
19
17
- php-version : 7.4
20
18
symfony-version : 4.4.*
21
- - php-version : 7.2
22
- symfony-version : 5.2 .*
19
+ - php-version : 8.0
20
+ symfony-version : 4.4 .*
23
21
- php-version : 7.4
24
22
symfony-version : 5.2.*
23
+ - php-version : 8.0
24
+ symfony-version : 5.2.*
25
25
26
26
steps :
27
27
- name : " Checkout"
48
48
strategy :
49
49
matrix :
50
50
include :
51
- - php-version : 7.4
52
- symfony-version : 4.4.*
51
+ - php-version : 8.0
53
52
54
53
steps :
55
54
- name : " Checkout"
62
61
php-version : ${{ matrix.php-version }}
63
62
64
63
- name : " Install dependencies with composer"
65
- run : |
66
- composer require --no-update "symfony/framework-bundle:${{ matrix.symfony-version }}"
67
- composer update --no-interaction --no-progress --no-suggest
64
+ run : composer update --no-interaction --no-progress --no-suggest
68
65
69
66
- name : " Run static analyzis with phpstan/phpstan"
70
67
run : vendor/bin/phpstan analyze
76
73
strategy :
77
74
matrix :
78
75
include :
79
- - php-version : 7.4
80
- symfony-version : 4.4.*
76
+ - php-version : 8.0
81
77
82
78
steps :
83
79
- name : " Checkout"
90
86
php-version : ${{ matrix.php-version }}
91
87
92
88
- name : " Install dependencies with composer"
93
- run : |
94
- composer require --no-update "symfony/framework-bundle:${{ matrix.symfony-version }}"
95
- composer update --no-interaction --no-progress --no-suggest
89
+ run : composer update --no-interaction --no-progress --no-suggest
96
90
97
91
- name : " Run checkstyle with squizlabs/php_codesniffer"
98
92
run : vendor/bin/phpcs
104
98
strategy :
105
99
matrix :
106
100
include :
107
- - php-version : 7.4
108
- symfony-version : 4.4.*
101
+ - php-version : 8.0
109
102
110
103
steps :
111
104
- name : " Checkout"
@@ -118,9 +111,7 @@ jobs:
118
111
php-version : ${{ matrix.php-version }}
119
112
120
113
- name : " Install dependencies with composer"
121
- run : |
122
- composer require --no-update "symfony/framework-bundle:${{ matrix.symfony-version }}"
123
- composer update --no-interaction --no-progress --no-suggest
114
+ run : composer update --no-interaction --no-progress --no-suggest
124
115
125
116
- name : " Run tests with phpunit/phpunit"
126
117
env :
Original file line number Diff line number Diff line change 9
9
}
10
10
],
11
11
"require" : {
12
- "php" : " ^7.1.3 " ,
12
+ "php" : " ^7.4|^8.0 " ,
13
13
"ext-openssl" : " *" ,
14
14
"symfony/framework-bundle" : " ^4.4|^5.0" ,
15
15
"doctrine/orm" : " ^2.7" ,
16
16
"doctrine/doctrine-bundle" : " ^2.0" ,
17
17
"yokai/dependency-injection" : " ^1.0"
18
18
},
19
19
"require-dev" : {
20
- "phpunit/phpunit" : " ^7.0" ,
21
- "symfony/yaml" : " ^4.4|^5.0" ,
22
- "phpstan/phpstan" : " ^0.12.80" ,
23
- "squizlabs/php_codesniffer" : " ^3.5"
20
+ "phpunit/phpunit" : " ^9.5" ,
21
+ "phpspec/prophecy-phpunit" : " ^2.0" ,
22
+ "symfony/yaml" : " ^4.4|^5.2" ,
23
+ "phpstan/phpstan" : " ^0.12" ,
24
+ "squizlabs/php_codesniffer" : " ^3.6"
24
25
},
25
26
"autoload" : {
26
27
"psr-4" : { "Yokai\\ SecurityTokenBundle\\ " : " src/" }
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
-
3
- <phpunit backupGlobals =" false"
2
+ <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3
+ xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.3/phpunit.xsd"
4
+ backupGlobals =" false"
4
5
backupStaticAttributes =" false"
5
6
convertErrorsToExceptions =" true"
6
7
convertNoticesToExceptions =" true"
7
8
convertWarningsToExceptions =" true"
8
9
processIsolation =" false"
9
10
stopOnFailure =" false"
10
11
colors =" true"
11
- bootstrap =" vendor/autoload.php"
12
- >
13
-
12
+ bootstrap =" vendor/autoload.php" >
14
13
<php >
15
14
<server name =" KERNEL_CLASS" value =" Yokai\SecurityTokenBundle\Tests\Kernel" />
16
15
</php >
17
-
18
16
<testsuites >
19
17
<testsuite name =" YokaiSecurityTokenBundle Test Suite" >
20
18
<directory >./tests</directory >
21
19
</testsuite >
22
20
</testsuites >
23
-
24
- <filter >
25
- <whitelist >
21
+ <coverage >
22
+ <include >
26
23
<directory >./src</directory >
27
- </whitelist >
28
- </filter >
24
+ </include >
25
+ </coverage >
29
26
</phpunit >
Original file line number Diff line number Diff line change 4
4
5
5
namespace Yokai \SecurityTokenBundle \Tests \Command ;
6
6
7
+ use Prophecy \PhpUnit \ProphecyTrait ;
7
8
use Prophecy \Prophecy \ObjectProphecy ;
8
9
use Symfony \Bundle \FrameworkBundle \Console \Application ;
9
10
use Symfony \Bundle \FrameworkBundle \Test \KernelTestCase ;
18
19
*/
19
20
class ArchiveTokenCommandTest extends KernelTestCase
20
21
{
22
+ use ProphecyTrait;
23
+
21
24
/**
22
25
* @var ArchivistInterface|ObjectProphecy
23
26
*/
Original file line number Diff line number Diff line change 10
10
use Doctrine \Persistence \Mapping \Driver \MappingDriverChain ;
11
11
use Generator ;
12
12
use PHPUnit \Framework \TestCase ;
13
+ use Prophecy \PhpUnit \ProphecyTrait ;
13
14
use Prophecy \Prophecy \ProphecySubjectInterface ;
14
15
use Psr \Log \LoggerInterface ;
15
16
use Symfony \Component \Config \FileLocator ;
37
38
*/
38
39
class DependencyInjectionTest extends TestCase
39
40
{
41
+ use ProphecyTrait;
42
+
40
43
/**
41
44
* @var ContainerBuilder
42
45
*/
Original file line number Diff line number Diff line change 6
6
7
7
use DateTime ;
8
8
use PHPUnit \Framework \TestCase ;
9
+ use Prophecy \PhpUnit \ProphecyTrait ;
9
10
use Prophecy \Prophecy \ObjectProphecy ;
10
11
use Yokai \SecurityTokenBundle \Configuration \TokenConfiguration ;
11
12
use Yokai \SecurityTokenBundle \Configuration \TokenConfigurationRegistry ;
23
24
*/
24
25
class TokenFactoryTest extends TestCase
25
26
{
27
+ use ProphecyTrait;
28
+
26
29
/**
27
30
* @var InformationGuesserInterface|ObjectProphecy
28
31
*/
Original file line number Diff line number Diff line change 7
7
use InvalidArgumentException ;
8
8
use PHPUnit \Framework \TestCase ;
9
9
use Prophecy \Argument ;
10
+ use Prophecy \PhpUnit \ProphecyTrait ;
10
11
use Prophecy \Prophecy \ObjectProphecy ;
11
12
use Yokai \SecurityTokenBundle \Manager \ChainUserManager ;
12
13
use Yokai \SecurityTokenBundle \Manager \UserManagerInterface ;
20
21
*/
21
22
class ChainUserManagerTest extends TestCase
22
23
{
24
+ use ProphecyTrait;
25
+
23
26
private function manager ($ managers ): ChainUserManager
24
27
{
25
28
return new ChainUserManager ($ managers );
Original file line number Diff line number Diff line change 9
9
use Doctrine \Persistence \Mapping \ClassMetadata ;
10
10
use Doctrine \Persistence \ObjectManager ;
11
11
use PHPUnit \Framework \TestCase ;
12
+ use Prophecy \PhpUnit \ProphecyTrait ;
12
13
use Prophecy \Prophecy \ObjectProphecy ;
13
14
use Yokai \SecurityTokenBundle \Manager \DoctrineUserManager ;
14
15
19
20
*/
20
21
class DoctrineUserManagerTest extends TestCase
21
22
{
23
+ use ProphecyTrait;
24
+
22
25
/**
23
26
* @var ManagerRegistry|ObjectProphecy
24
27
*/
Original file line number Diff line number Diff line change 6
6
7
7
use PHPUnit \Framework \TestCase ;
8
8
use Prophecy \Argument ;
9
+ use Prophecy \PhpUnit \ProphecyTrait ;
9
10
use Prophecy \Prophecy \ObjectProphecy ;
10
11
use Symfony \Contracts \EventDispatcher \EventDispatcherInterface ;
11
12
use Yokai \SecurityTokenBundle \Entity \Token ;
35
36
*/
36
37
class TokenManagerTest extends TestCase
37
38
{
39
+ use ProphecyTrait;
40
+
38
41
/**
39
42
* @var TokenFactoryInterface|ObjectProphecy
40
43
*/
Original file line number Diff line number Diff line change 7
7
use Doctrine \ORM \EntityManager ;
8
8
use Doctrine \ORM \EntityRepository ;
9
9
use PHPUnit \Framework \TestCase ;
10
+ use Prophecy \PhpUnit \ProphecyTrait ;
10
11
use Prophecy \Prophecy \ObjectProphecy ;
11
12
use Yokai \SecurityTokenBundle \Entity \Token ;
12
13
use Yokai \SecurityTokenBundle \Exception \TokenConsumedException ;
21
22
*/
22
23
class DoctrineORMTokenRepositoryTest extends TestCase
23
24
{
25
+ use ProphecyTrait;
26
+
24
27
/**
25
28
* @var EntityManager|ObjectProphecy
26
29
*/
You can’t perform that action at this time.
0 commit comments