startStoryplayer() public method

called when storyplayer starts
public startStoryplayer ( string $version, string $url, string $copyright, string $license ) : void
$version string
$url string
$copyright string
$license string
return void
Exemplo n.º 1
0
 /**
  * @covers DataSift\Storyplayer\Output::startStoryplayer()
  */
 public function testCanStartStoryplayer()
 {
     // ----------------------------------------------------------------
     // setup the test
     $version = "6.6.6";
     $url = "http://notarealurl.topleveldomain";
     $copyright = "a copyright string";
     $license = "a license string";
     $plugin1 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
     $plugin1->shouldReceive('startStoryplayer')->once()->with($version, $url, $copyright, $license);
     $plugin2 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
     $plugin2->shouldReceive('startStoryplayer')->once()->with($version, $url, $copyright, $license);
     $obj = new Output();
     $obj->usePluginInSlot($plugin1, "console");
     $obj->usePluginInSlot($plugin2, "slot1");
     // ----------------------------------------------------------------
     // perform the change
     $obj->startStoryplayer($version, $url, $copyright, $license);
     // ----------------------------------------------------------------
     // test the results
     Mockery::close();
 }