public function testExecute()
{
if (defined('HHVM_VERSION')) {
self::markTestSkipped('test will fail for hhvm');
}
$input = $this->getMockBuilder(\Symfony\Component\Console\Input\ArgvInput::class)->disableOriginalConstructor()->getMock();
$objectIniPath = ini_get('browscap');
if (!is_file($objectIniPath)) {
$this->expectException(BrowscapException::class);
$this->expectExceptionMessage('an error occured while converting the local file into the cache');
} else {
$input->expects(self::exactly(2))->method('getArgument')->with('file')->will(self::returnValue($objectIniPath));
}
$output = $this->getMockBuilder(\Symfony\Component\Console\Output\ConsoleOutput::class)->disableOriginalConstructor()->getMock();
$class = new \ReflectionClass('\\BrowscapPHP\\Command\\ConvertCommand');
$method = $class->getMethod('execute');
$method->setAccessible(true);
self::assertNull($method->invoke($this->object, $input, $output));
}