/**
  * @covers Agent::setDetectionType
  */
 public function testSetDetectionType()
 {
     $md = new Agent(array());
     $md->setDetectionType('bskdfjhs');
     $this->assertAttributeEquals(Agent::DETECTION_TYPE_MOBILE, 'detectionType', $md);
     $md->setDetectionType();
     $this->assertAttributeEquals(Agent::DETECTION_TYPE_MOBILE, 'detectionType', $md);
     $md->setDetectionType(Agent::DETECTION_TYPE_MOBILE);
     $this->assertAttributeEquals(Agent::DETECTION_TYPE_MOBILE, 'detectionType', $md);
     $md->setDetectionType(Agent::DETECTION_TYPE_EXTENDED);
     $this->assertAttributeEquals(Agent::DETECTION_TYPE_EXTENDED, 'detectionType', $md);
 }
Exemple #2
0
 /**
  * Set the detection type. Must be one of self::DETECTION_TYPE_MOBILE or
  * self::DETECTION_TYPE_EXTENDED. Otherwise, nothing is set.
  *
  * @deprecated since version 2.6.9
  * @param string $type The type. Must be a self::DETECTION_TYPE_* constant. The default
  *                     parameter is null which will default to self::DETECTION_TYPE_MOBILE.
  * @static 
  */
 public static function setDetectionType($type = null)
 {
     //Method inherited from \Mobile_Detect
     return \Jenssegers\Agent\Agent::setDetectionType($type);
 }