<?php

use Ockcyp\WpJsCli\Command\GotoCommand;

class GotoCommandTest extends PHPUnit_Framework_TestCase
{
    public function setUp()
    {
        $this->gotoCommand = new GotoCommand;
    }

    /**
     * @expectedException Ockcyp\WpJsCli\Exception\MissingCommandArgumentException
     */
    public function testGivesMissingCommandArgumentException()
    {
        $this->gotoCommand->execute();
    }
}

<?php

use Ockcyp\WpJsCli\Command\GotoCommand;

class GotoCommandTest extends PHPUnit_Framework_TestCase
{
    public function setUp()
    {
        $this->gotoCommand = new GotoCommand;
    }

    /**
     * @expectedException Ockcyp\WpJsCli\Exception\MissingCommandArgumentException
     */
    public function testGivesMissingCommandArgumentException()
    {
        $this->gotoCommand->execute();
    }

    public function testReturnsNullWhenPostNotFound()
    {
        $res = $this->gotoCommand->addArguments('about')
            ->execute();

        $this->assertNotEmpty($res);
        $this->assertEquals('http://www.ockwebs.com/about/', $res['url']);
    }

    public function testReturnsPostUrl()
    {
        $res = $this->gotoCommand->addArguments('not-a-post')
            ->execute();

        $this->assertNull($res);
    }
}

Add more tests for GotoCommand
Add more tests for GotoCommand
