BrowscapPHPTest\Command\ParserCommandTest::testConfigure PHP Method

testConfigure() public method

public testConfigure ( )
    public function testConfigure()
    {
        $object = $this->getMockBuilder(\BrowscapPHP\Command\ParserCommand::class)->disableOriginalConstructor()->setMethods(['setName', 'setDescription', 'addArgument', 'addOption'])->getMock();
        $object->expects(self::once())->method('setName')->will(self::returnSelf());
        $object->expects(self::once())->method('setDescription')->will(self::returnSelf());
        $object->expects(self::once())->method('addArgument')->will(self::returnSelf());
        $object->expects(self::exactly(2))->method('addOption')->will(self::returnSelf());
        $class = new \ReflectionClass('\\BrowscapPHP\\Command\\ParserCommand');
        $method = $class->getMethod('configure');
        $method->setAccessible(true);
        $cache = $this->getMockBuilder(\BrowscapPHP\Cache\BrowscapCache::class)->disableOriginalConstructor()->setMethods(['getVersion'])->getMock();
        $cache->expects(self::never())->method('getVersion')->will(self::returnValue(1));
        $object->setCache($cache);
        self::assertNull($method->invoke($object));
    }