public function reset($properties = null)
{
unset($this->manufacturer);
unset($this->model);
unset($this->series);
unset($this->carrier);
unset($this->identifier);
$this->type = '';
$this->subtype = '';
$this->identified = Constants\Id::NONE;
$this->generic = true;
$this->hidden = false;
if (is_array($properties)) {
$this->set($properties);
}
}
public function testDetected() { $device = new Device(); $this->assertFalse($device->isDetected()); $device->set(['manufacturer' => 'Microsoft', 'model' => 'Xbox One']); $this->assertTrue($device->isDetected()); $device->reset(); $this->assertFalse($device->isDetected()); $device->set(['model' => 'Xbox One']); $this->assertTrue($device->isDetected()); $device->set(['manufacturer' => 'Microsoft']); $this->assertTrue($device->isDetected()); }