endPhaseGroup() public method

NOTE: we cannot use a type-hint for $result here. we may pass in a class that inherits from PhaseGroup_Result, and (annoyingly) this isn't allowed if we use a type-hint (grrrr)
public endPhaseGroup ( PhaseGroup_Result $result ) : void
$result DataSift\Storyplayer\PlayerLib\PhaseGroup_Result
return void
Exemplo n.º 1
0
 /**
  * @covers DataSift\Storyplayer\Output::endPhaseGroup()
  */
 public function testCanEndPhaseGroup()
 {
     // ----------------------------------------------------------------
     // setup the test
     $result = new PhaseGroup_Result('testing');
     $plugin1 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
     $plugin1->shouldReceive('endPhaseGroup')->once()->with($result);
     $plugin2 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
     $plugin2->shouldReceive('endPhaseGroup')->once()->with($result);
     $obj = new Output();
     $obj->usePluginInSlot($plugin1, "console");
     $obj->usePluginInSlot($plugin2, "slot1");
     // ----------------------------------------------------------------
     // perform the change
     $obj->endPhaseGroup($result);
     // ----------------------------------------------------------------
     // test the results
     Mockery::close();
 }