Clinner\Command\Tests\CommandTest::testGetOptionNoDefault PHP Метод

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

    public function testGetOptionNoDefault()
    {
        $optName = 'option-name';
        $opts = $this->getMock('\\Clinner\\ValueHolder');
        $opts->expects($this->once())->method('get')->with($this->equalTo($optName))->will($this->returnValue(null));
        $command = $this->getMockBuilder('\\Clinner\\Command\\Command')->disableOriginalConstructor()->setMethods(null)->getMock();
        $this->_setPrivateProperty($command, '_options', $opts);
        $response = $command->getOption($optName);
        $this->assertNull($response);
    }