File tree Expand file tree Collapse file tree
tests/aik099/PHPUnit/BrowserConfiguration Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -367,8 +367,12 @@ public function testTestEndedWithoutSession($stopped_or_missing)
367367 $ event ->shouldReceive ('getSession ' )->once ();
368368 }
369369
370- $ event ->shouldReceive ('setDispatcher ' )->once (); // To remove with Symfony 3.0 release.
371- $ event ->shouldReceive ('setName ' )->once (); // To remove with Symfony 3.0 release.
370+ // Below methods were removed in Symfony 3.0.
371+ if ( \method_exists ('\Symfony\Component\EventDispatcher\Event ' , 'setDispatcher ' ) ) {
372+ $ event ->shouldReceive ('setDispatcher ' )->once ();
373+ $ event ->shouldReceive ('setName ' )->once ();
374+ }
375+
372376 $ event ->shouldReceive ('isPropagationStopped ' )->once ()->andReturn (false );
373377 $ event ->shouldReceive ('getTestCase ' )->andReturn ($ test_case );
374378 $ event ->shouldReceive ('validateSubscriber ' )->with ($ test_case )->atLeast ()->once ()->andReturn (true );
@@ -382,8 +386,8 @@ public function testTestEndedWithoutSession($stopped_or_missing)
382386 public function sessionStateDataProvider ()
383387 {
384388 return array (
385- array (true ),
386- array (false ),
389+ ' session stopped/missing ' => array (true ),
390+ ' session started ' => array (false ),
387391 );
388392 }
389393
You can’t perform that action at this time.
0 commit comments