reset() 공개 메소드

Set the properties to the default values
public reset ( array | null $properties = null )
$properties array | null An optional array of properties to set after setting it to the default values
예제 #1
0
 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());
 }