DataSift\Storyplayer\OutputTest::testCanEndStoryplayer PHP Метод

testCanEndStoryplayer() публичный Метод

    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();
    }