/** * Tests the JApplicationWebClient::detectRobot method. * * @param string $userAgent The user agent * @param boolean $expected The expected results of the function * * @return void * * @dataProvider detectRobotData * @since 12.3 */ public function testDetectRobot($userAgent, $expected) { $this->inspector->detectRobot($userAgent); // Test the assertions. $this->assertEquals($this->inspector->robot, $expected, 'Robot detection failed'); }
/** * Tests the JWebClient::detectPlatform method. * * @param string $p The expected platform. * @param boolean $m The expected mobile result. * @param string $e The expected engine. * @param string $b The expected browser. * @param string $v The expected browser version. * @param string $ua The input user agent. * * @return void * * @dataProvider getUserAgentData * @since 11.3 */ public function testDetectPlatform($p, $m, $e, $b, $v, $ua) { $this->inspector->detectPlatform($ua); // Test the assertions. $this->assertEquals($this->inspector->mobile, $m, 'Mobile detection failed.'); $this->assertEquals($this->inspector->platform, $p, 'Platform detection failed.'); }