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

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

    public function testCanLogPhaseCodeLine()
    {
        // ----------------------------------------------------------------
        // setup the test
        $codeLine = ["file" => "unit-test.php", "line" => 666, "code" => "\$st->fromUnitTests()->testAllTheThings();"];
        $plugin1 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
        $plugin1->shouldReceive('logPhaseCodeLine')->once()->with($codeLine);
        $plugin2 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
        $plugin2->shouldReceive('logPhaseCodeLine')->once()->with($codeLine);
        $obj = new Output();
        $obj->usePluginInSlot($plugin1, "console");
        $obj->usePluginInSlot($plugin2, "slot1");
        // ----------------------------------------------------------------
        // perform the change
        $obj->logPhaseCodeLine($codeLine);
        // ----------------------------------------------------------------
        // test the results
        Mockery::close();
    }