endStoryplayer() public method

called when Storyplayer exits
public endStoryplayer ( float $duration ) : integer
$duration float how long did storyplayer take to run (in seconds)?
return integer
Exemplo n.º 1
0
 /**
  * @covers DataSift\Storyplayer\Output::endStoryplayer()
  */
 public function testCanEndStoryplayer()
 {
     // ----------------------------------------------------------------
     // setup the test
     $duration = 100;
     $plugin1 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
     $plugin1->shouldReceive('endStoryplayer')->once()->with($duration);
     $plugin2 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
     $plugin2->shouldReceive('endStoryplayer')->once()->with($duration);
     $obj = new Output();
     $obj->usePluginInSlot($plugin1, "console");
     $obj->usePluginInSlot($plugin2, "slot1");
     // ----------------------------------------------------------------
     // perform the change
     $obj->endStoryplayer($duration);
     // ----------------------------------------------------------------
     // test the results
     Mockery::close();
 }