77use Doctrine \ORM \Configuration ;
88use Doctrine \ORM \EntityManagerInterface ;
99use Doctrine \ORM \Mapping \MappingException ;
10+ use Doctrine \ORM \Tools \Console \ApplicationCompatibility ;
1011use Doctrine \ORM \Tools \Console \Command \InfoCommand ;
1112use Doctrine \ORM \Tools \Console \EntityManagerProvider \SingleManagerProvider ;
1213use Doctrine \ORM \Tools \Console \Helper \EntityManagerHelper ;
2021
2122class InfoCommandTest extends OrmFunctionalTestCase
2223{
24+ use ApplicationCompatibility;
25+
2326 /** @var Application */
2427 private $ application ;
2528
@@ -35,7 +38,7 @@ protected function setUp(): void
3538
3639 $ this ->application = new Application ();
3740
38- $ this ->application -> add ( new InfoCommand (new SingleManagerProvider ($ this ->_em )));
41+ self :: addCommandToApplication ( $ this ->application , new InfoCommand (new SingleManagerProvider ($ this ->_em )));
3942
4043 $ this ->command = $ this ->application ->find ('orm:info ' );
4144 $ this ->tester = new CommandTester ($ this ->command );
@@ -66,7 +69,7 @@ public function testEmptyEntityClassNames(): void
6669
6770 $ application = new Application ();
6871 $ application ->setHelperSet (new HelperSet (['em ' => new EntityManagerHelper ($ em )]));
69- $ application-> add ( new InfoCommand ());
72+ self :: addCommandToApplication ( $ application, new InfoCommand ());
7073
7174 $ command = $ application ->find ('orm:info ' );
7275 $ tester = new CommandTester ($ command );
@@ -105,7 +108,7 @@ public function testInvalidEntityClassMetadata(): void
105108
106109 $ application = new Application ();
107110 $ application ->setHelperSet (new HelperSet (['em ' => new EntityManagerHelper ($ em )]));
108- $ application-> add ( new InfoCommand ());
111+ self :: addCommandToApplication ( $ application, new InfoCommand ());
109112
110113 $ command = $ application ->find ('orm:info ' );
111114 $ tester = new CommandTester ($ command );
0 commit comments