logPhaseError() public méthode

called when a story logs an error
public logPhaseError ( string $phaseName, string $msg ) : void
$phaseName string the name of the phase where the error occurred
$msg string an error message to send to console|logfile
Résultat void
Exemple #1
0
 /**
  * @covers DataSift\Storyplayer\Output::logPhaseError()
  */
 public function testCanLogPhaseError()
 {
     // ----------------------------------------------------------------
     // setup the test
     $phaseName = "a unit-test";
     $msg = "something went right ... wait, what?!?";
     $plugin1 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
     $plugin1->shouldReceive('logPhaseError')->once()->with($phaseName, $msg);
     $plugin2 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
     $plugin2->shouldReceive('logPhaseError')->once()->with($phaseName, $msg);
     $obj = new Output();
     $obj->usePluginInSlot($plugin1, "console");
     $obj->usePluginInSlot($plugin2, "slot1");
     // ----------------------------------------------------------------
     // perform the change
     $obj->logPhaseError($phaseName, $msg);
     // ----------------------------------------------------------------
     // test the results
     Mockery::close();
 }