DataSift\Storyplayer\CommandLib\CommandRunnerTest::testCanRunCommands PHP Метод

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

public testCanRunCommands ( )
    public function testCanRunCommands()
    {
        // ----------------------------------------------------------------
        // setup your test
        // our test subject
        $obj = new CommandRunner();
        // a fake logging object
        $log = Mockery::mock("DataSift\\Storyplayer\\PlayerLib\\Action_LogItem");
        $log->shouldReceive('endAction')->once();
        // our mocked $st
        $st = Mockery::mock("DataSift\\Storyplayer\\PlayerLib\\StoryTeller");
        $st->shouldReceive('startAction')->andReturn($log);
        // our example command
        $helperCmd = "true";
        // ----------------------------------------------------------------
        // perform the change
        $result = $obj->runSilently($st, $helperCmd);
        // ----------------------------------------------------------------
        // test the results
        $this->assertTrue($result instanceof CommandResult);
    }