logCliInfo() public method

called when the outer CLI shell needs to tell the user something
public logCliInfo ( string $msg ) : void
$msg string the message to show the user
return void
Exemplo n.º 1
0
 /**
  * @covers DataSift\Storyplayer\Output::logCliInfo()
  */
 public function testCanLogCliInfo()
 {
     // ----------------------------------------------------------------
     // setup the test
     $msg = "there's nothing to see here ... move along, move along";
     $plugin1 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
     $plugin1->shouldReceive('logCliInfo')->once()->with($msg);
     $plugin2 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
     $plugin2->shouldReceive('logCliInfo')->once()->with($msg);
     $obj = new Output();
     $obj->usePluginInSlot($plugin1, "console");
     $obj->usePluginInSlot($plugin2, "slot1");
     // ----------------------------------------------------------------
     // perform the change
     $obj->logCliInfo($msg);
     // ----------------------------------------------------------------
     // test the results
     Mockery::close();
 }