/**
* @covers DataSift\Storyplayer\Output::endPhase()
*/
public function testCanEndPhase()
{
// ----------------------------------------------------------------
// setup the test
$st = Mockery::mock("DataSift\\Storyplayer\\PlayerLib\\StoryTeller");
$phase = new ExampleStoryPhase($st);
$result = new Phase_Result('unit-test');
$plugin1 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
$plugin1->shouldReceive('endPhase')->once()->with($phase, $result);
$plugin2 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
$plugin2->shouldReceive('endPhase')->once()->with($phase, $result);
$obj = new Output();
$obj->usePluginInSlot($plugin1, "console");
$obj->usePluginInSlot($plugin2, "slot1");
// ----------------------------------------------------------------
// perform the change
$obj->endPhase($phase, $result);
// ----------------------------------------------------------------
// test the results
Mockery::close();
}