File tree Expand file tree Collapse file tree 4 files changed +29
-42
lines changed Expand file tree Collapse file tree 4 files changed +29
-42
lines changed Original file line number Diff line number Diff line change 8
8
9
9
strategy :
10
10
matrix :
11
- php-versions : ['7.3', '7.4']
11
+ php-versions : ['7.3', '7.4', '8.0' ]
12
12
name : PHP ${{ matrix.php-versions }}
13
13
steps :
14
14
- uses : actions/checkout@v2
27
27
run : composer install --no-progress --prefer-dist --optimize-autoloader
28
28
- name : phpunit
29
29
run : php vendor/bin/phpunit
30
-
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " hostnet/path-composer-plugin-lib" ,
3
- "description" : " Publish vendor_dir and base_dir as constants" ,
4
3
"type" : " composer-plugin" ,
4
+ "description" : " Publish vendor_dir and base_dir as constants" ,
5
5
"license" : " MIT" ,
6
- "authors" : [
7
- {
8
- "name" : " Hidde Boomsma" ,
9
-
10
- }
11
- ],
6
+ "require" : {
7
+ "php" : " ^7.3||^8.0" ,
8
+ "composer-plugin-api" : " ^2.0.0"
9
+ },
10
+ "require-dev" : {
11
+ "composer/composer" : " ^2.0" ,
12
+ "phpunit/phpunit" : " ^9.5.6" ,
13
+ "squizlabs/php_codesniffer" : " ^2.9"
14
+ },
12
15
"autoload" : {
13
16
"psr-4" : {
14
17
"Hostnet\\ Component\\ Path\\ " : " src"
15
18
}
16
19
},
17
- "require" : {
18
- "php" : " >=5.6" ,
19
- "composer-plugin-api" : " ^2.0.0"
20
- },
21
20
"extra" : {
22
21
"class" : " Hostnet\\ Component\\ Path\\ Plugin"
23
- },
24
- "require-dev" : {
25
- "composer/composer" : " ^2.0" ,
26
- "phpunit/phpunit" : " ^5.7" ,
27
- "squizlabs/php_codesniffer" : " ^2.9"
28
22
}
29
23
}
Original file line number Diff line number Diff line change 1
- <phpunit
2
- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3
- xsi : noNamespaceSchemaLocation =" http://schema.phpunit.de/5.2/phpunit.xsd"
4
- bootstrap =" vendor/autoload.php"
5
- colors =" true"
6
- mapTestClassNameToCoveredClassName =" true"
7
- >
8
-
9
- <testsuites >
10
- <testsuite name =" path-composer-plugin-lib" >
11
- <directory >test/</directory >
12
- </testsuite >
13
- </testsuites >
14
-
15
- <filter >
16
- <whitelist >
17
- <directory >./src</directory >
18
- </whitelist >
19
- </filter >
1
+ <?xml version =" 1.0" ?>
2
+ <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.3/phpunit.xsd" bootstrap =" vendor/autoload.php" colors =" true" >
3
+ <coverage >
4
+ <include >
5
+ <directory >./src</directory >
6
+ </include >
7
+ </coverage >
8
+ <testsuites >
9
+ <testsuite name =" path-composer-plugin-lib" >
10
+ <directory >test/</directory >
11
+ </testsuite >
12
+ </testsuites >
20
13
</phpunit >
Original file line number Diff line number Diff line change 5
5
use Composer \Config ;
6
6
use Composer \IO \NullIO ;
7
7
use Composer \Script \ScriptEvents ;
8
+ use PHPUnit \Framework \TestCase ;
8
9
9
10
/**
10
11
* @covers \Hostnet\Component\Path\Plugin
11
12
*/
12
- class PluginTest extends \PHPUnit_Framework_TestCase
13
+ class PluginTest extends TestCase
13
14
{
14
15
/**
15
16
* @var Plugin
16
17
*/
17
18
private $ plugin ;
18
19
19
- protected function setUp ()
20
+ protected function setUp (): void
20
21
{
21
22
$ this ->plugin = new Plugin ();
22
23
}
23
24
24
- public function testGetSubscribedEvents ()
25
+ public function testGetSubscribedEvents (): void
25
26
{
26
27
self ::assertSame (
27
28
[ScriptEvents::PRE_AUTOLOAD_DUMP => 'onPreAutoloadDump ' ],
28
29
$ this ->plugin ->getSubscribedEvents ()
29
30
);
30
31
}
31
32
32
- public function testOnPreAutoloadDump ()
33
+ public function testOnPreAutoloadDump (): void
33
34
{
34
35
$ config = new Config (false , __DIR__ . '/../ ' );
35
36
$ composer = new Composer ();
@@ -44,7 +45,7 @@ public function testOnPreAutoloadDump()
44
45
self ::assertEquals (realpath (__DIR__ . '/../vendor ' ), Path::VENDOR_DIR );
45
46
}
46
47
47
- protected function tearDown ()
48
+ protected function tearDown (): void
48
49
{
49
50
@unlink (__DIR__ . '/../src/Path.php ' );
50
51
}
You can’t perform that action at this time.
0 commit comments