DataSift\Storyplayer\OutputTest::testCanLogCliError PHP Method

testCanLogCliError() public method

public testCanLogCliError ( )
    public function testCanLogCliError()
    {
        // ----------------------------------------------------------------
        // setup the test
        $msg = "this is an emergency, damnit!";
        $plugin1 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
        $plugin1->shouldReceive('logCliError')->once()->with($msg);
        $plugin2 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
        $plugin2->shouldReceive('logCliError')->once()->with($msg);
        $obj = new Output();
        $obj->usePluginInSlot($plugin1, "console");
        $obj->usePluginInSlot($plugin2, "slot1");
        // ----------------------------------------------------------------
        // perform the change
        $obj->logCliError($msg);
        // ----------------------------------------------------------------
        // test the results
        Mockery::close();
    }