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