DataSift\Storyplayer\OutputTest::testCanLogCliErrorWithException PHP Method

testCanLogCliErrorWithException() public method

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