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 77 " AFL-3.0"
88 ],
99 "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 " ,
1212 "symfony/console" : " ~4.4.0"
1313 },
1414 "require-dev" : {
15- "phpunit/phpunit" : " ~7.0.0 "
15+ "phpunit/phpunit" : " ^9 "
1616 },
1717 "autoload" : {
1818 "psr-4" : {
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class ConsoleArrayInputFactoryTest extends \PHPUnit\Framework\TestCase
1414 */
1515 protected $ factory ;
1616
17- protected function setUp ()
17+ protected function setUp (): void
1818 {
1919 $ this ->factory = new ConsoleArrayInputFactory ();
2020 }
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class InfoCommandTest extends \PHPUnit\Framework\TestCase
3131 */
3232 protected $ infoCommand ;
3333
34- protected function setUp ()
34+ protected function setUp (): void
3535 {
3636 $ this ->application = $ this ->createMock (\Magento \Composer \MagentoComposerApplication::class);
3737
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class MagentoComposerApplicationTest extends \PHPUnit\Framework\TestCase
3131 */
3232 protected $ consoleOutput ;
3333
34- protected function setUp ()
34+ protected function setUp (): void
3535 {
3636 $ this ->composerApplication = $ this ->createMock (\Composer \Console \Application::class);
3737 $ this ->inputFactory = $ this ->createMock (\Magento \Composer \ConsoleArrayInputFactory::class);
@@ -46,13 +46,11 @@ protected function setUp()
4646 );
4747 }
4848
49- /**
50- * @expectedException \RuntimeException
51- * @expectedExceptionMessage Command "update" failed
52- */
5349 function testWrongExitCode ()
5450 {
5551 $ this ->composerApplication ->expects ($ this ->once ())->method ('run ' )->willReturn (1 );
52+ $ this ->expectException (\RuntimeException::class);
53+ $ this ->expectExceptionMessage ('Command "update" failed ' );
5654
5755 $ this ->application ->runComposerCommand (['command ' =>'update ' ]);
5856 }
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ class RequireUpdateDryRunCommandTest extends \PHPUnit\Framework\TestCase
6262 ]
6363 ];
6464
65- protected function setUp ()
65+ protected function setUp (): void
6666 {
6767 $ this ->application = $ this ->createMock (\Magento \Composer \MagentoComposerApplication::class);
6868 $ this ->infoCommand = $ this ->createMock (\Magento \Composer \InfoCommand::class);
@@ -79,15 +79,12 @@ public function testRun()
7979 $ this ->requireUpdateDryRunCommand ->run ([], '' );
8080 }
8181
82- /**
83- * @expectedException \RuntimeException
84- * @expectedExceptionMessage
85- */
8682 public function testRunException ()
8783 {
8884 $ this ->application ->expects ($ this ->at (1 ))
8985 ->method ('runComposerCommand ' )
9086 ->willThrowException (new \RuntimeException ($ this ->errorMessage ));
87+ $ this ->expectException (\RuntimeException::class);
9188 $ this ->infoCommand ->expects ($ this ->once ())->method ('run ' )->willReturn ($ this ->packageInfo );
9289 $ this ->requireUpdateDryRunCommand ->run (['3rdp/e 1.2.0 ' ], '' );
9390 }
You can’t perform that action at this time.
0 commit comments