File tree Expand file tree Collapse file tree 5 files changed +10
-15
lines changed Expand file tree Collapse file tree 5 files changed +10
-15
lines changed Original file line number Diff line number Diff line change 7
7
" AFL-3.0"
8
8
],
9
9
"require" : {
10
- "php" : " ~7.1.3||~7.2.0||~7.3.0" ,
11
- "composer/composer" : " ^1.6 " ,
10
+ "php" : " ~7.1.3||~7.2.0||~7.3.0||~7.4.0 " ,
11
+ "composer/composer" : " ^1.9 " ,
12
12
"symfony/console" : " ~4.4.0"
13
13
},
14
14
"require-dev" : {
15
- "phpunit/phpunit" : " ~7.0.0 "
15
+ "phpunit/phpunit" : " ^9 "
16
16
},
17
17
"autoload" : {
18
18
"psr-4" : {
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class ConsoleArrayInputFactoryTest extends \PHPUnit\Framework\TestCase
14
14
*/
15
15
protected $ factory ;
16
16
17
- protected function setUp ()
17
+ protected function setUp (): void
18
18
{
19
19
$ this ->factory = new ConsoleArrayInputFactory ();
20
20
}
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class InfoCommandTest extends \PHPUnit\Framework\TestCase
31
31
*/
32
32
protected $ infoCommand ;
33
33
34
- protected function setUp ()
34
+ protected function setUp (): void
35
35
{
36
36
$ this ->application = $ this ->createMock (\Magento \Composer \MagentoComposerApplication::class);
37
37
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class MagentoComposerApplicationTest extends \PHPUnit\Framework\TestCase
31
31
*/
32
32
protected $ consoleOutput ;
33
33
34
- protected function setUp ()
34
+ protected function setUp (): void
35
35
{
36
36
$ this ->composerApplication = $ this ->createMock (\Composer \Console \Application::class);
37
37
$ this ->inputFactory = $ this ->createMock (\Magento \Composer \ConsoleArrayInputFactory::class);
@@ -46,13 +46,11 @@ protected function setUp()
46
46
);
47
47
}
48
48
49
- /**
50
- * @expectedException \RuntimeException
51
- * @expectedExceptionMessage Command "update" failed
52
- */
53
49
function testWrongExitCode ()
54
50
{
55
51
$ this ->composerApplication ->expects ($ this ->once ())->method ('run ' )->willReturn (1 );
52
+ $ this ->expectException (\RuntimeException::class);
53
+ $ this ->expectExceptionMessage ('Command "update" failed ' );
56
54
57
55
$ this ->application ->runComposerCommand (['command ' =>'update ' ]);
58
56
}
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ class RequireUpdateDryRunCommandTest extends \PHPUnit\Framework\TestCase
62
62
]
63
63
];
64
64
65
- protected function setUp ()
65
+ protected function setUp (): void
66
66
{
67
67
$ this ->application = $ this ->createMock (\Magento \Composer \MagentoComposerApplication::class);
68
68
$ this ->infoCommand = $ this ->createMock (\Magento \Composer \InfoCommand::class);
@@ -79,15 +79,12 @@ public function testRun()
79
79
$ this ->requireUpdateDryRunCommand ->run ([], '' );
80
80
}
81
81
82
- /**
83
- * @expectedException \RuntimeException
84
- * @expectedExceptionMessage
85
- */
86
82
public function testRunException ()
87
83
{
88
84
$ this ->application ->expects ($ this ->at (1 ))
89
85
->method ('runComposerCommand ' )
90
86
->willThrowException (new \RuntimeException ($ this ->errorMessage ));
87
+ $ this ->expectException (\RuntimeException::class);
91
88
$ this ->infoCommand ->expects ($ this ->once ())->method ('run ' )->willReturn ($ this ->packageInfo );
92
89
$ this ->requireUpdateDryRunCommand ->run (['3rdp/e 1.2.0 ' ], '' );
93
90
}
You can’t perform that action at this time.
0 commit comments