public function testVersion() { $cache = $this->getMock('BrowscapPHP\\Cache\\BrowscapCache', [], [], '', false); $cache->expects($this->any())->method('getVersion')->will($this->returnValue('321')); $parser = $this->getParser(); $parser->expects($this->any())->method('getCache')->will($this->returnValue($cache)); $provider = new BrowscapPhp($parser); $this->assertEquals('321', $provider->getVersion()); }