44
55use Doctrine \ORM \EntityManager ;
66use Doctrine \ORM \Tools \SchemaTool ;
7+ use LogicException ;
78use SimpleBus \SymfonyBridge \Tests \Functional \SmokeTest \Auto \AutoCommand1 ;
89use SimpleBus \SymfonyBridge \Tests \Functional \SmokeTest \Auto \AutoCommand2 ;
910use SimpleBus \SymfonyBridge \Tests \Functional \SmokeTest \Auto \AutoEvent1 ;
@@ -23,7 +24,7 @@ protected static function getKernelClass()
2324 return TestKernel::class;
2425 }
2526
26- protected function tearDown ()
27+ protected function tearDown (): void
2728 {
2829 parent ::tearDown ();
2930
@@ -54,12 +55,12 @@ public function it_handles_a_command_then_dispatches_events_for_all_modified_ent
5455
5556 // it has logged some things
5657 $ loggedMessages = file_get_contents ($ container ->getParameter ('log_file ' ));
57- $ this ->assertContains ('command_bus.DEBUG: Started handling a message ' , $ loggedMessages );
58- $ this ->assertContains ('command_bus.DEBUG: Finished handling a message ' , $ loggedMessages );
59- $ this ->assertContains ('event_bus.DEBUG: Started handling a message ' , $ loggedMessages );
60- $ this ->assertContains ('event_bus.DEBUG: Finished handling a message ' , $ loggedMessages );
61- $ this ->assertContains ('event_bus.DEBUG: Started notifying a subscriber ' , $ loggedMessages );
62- $ this ->assertContains ('event_bus.DEBUG: Finished notifying a subscriber ' , $ loggedMessages );
58+ $ this ->assertStringContainsString ('command_bus.DEBUG: Started handling a message ' , $ loggedMessages );
59+ $ this ->assertStringContainsString ('command_bus.DEBUG: Finished handling a message ' , $ loggedMessages );
60+ $ this ->assertStringContainsString ('event_bus.DEBUG: Started handling a message ' , $ loggedMessages );
61+ $ this ->assertStringContainsString ('event_bus.DEBUG: Finished handling a message ' , $ loggedMessages );
62+ $ this ->assertStringContainsString ('event_bus.DEBUG: Started notifying a subscriber ' , $ loggedMessages );
63+ $ this ->assertStringContainsString ('event_bus.DEBUG: Finished notifying a subscriber ' , $ loggedMessages );
6364 }
6465
6566 /**
@@ -136,14 +137,13 @@ public function it_can_auto_register_command_handlers_using_public_method()
136137
137138 /**
138139 * @test
139- *
140140 * @group SymfonyBridgeProxyManagerDependency
141- *
142- * @expectedException \LogicException
143- * @expectedExceptionMessage In order to use bundle "DoctrineOrmBridgeBundle" you need to require "symfony/proxy-manager-bridge" package.
144141 */
145142 public function fails_because_of_mising_dependency ()
146143 {
144+ $ this ->expectException (LogicException::class);
145+ $ this ->expectExceptionMessage ('In order to use bundle "DoctrineOrmBridgeBundle" you need to require "symfony/proxy-manager-bridge" package. ' );
146+
147147 self ::bootKernel (['environment ' => 'config2 ' ]);
148148 }
149149
0 commit comments