/** * @covers Agent::getScriptVersion */ public function testScriptVersion() { $v = Agent::getScriptVersion(); if (!preg_match('/^[0-9]+\\.[0-9]+\\.[0-9](-[a-zA-Z0-9])?$/', $v)) { $this->fail("Fails the semantic version test. The version " . var_export($v, true) . ' does not match X.Y.Z pattern'); } }
/** * Get the current script version. * * This is useful for the demo.php file, * so people can check on what version they are testing * for mobile devices. * * @return string The version number in semantic version format. * @static */ public static function getScriptVersion() { //Method inherited from \Mobile_Detect return \Jenssegers\Agent\Agent::getScriptVersion(); }