Phue\Command\CreateSchedule::autodelete PHP Method

autodelete() public method

Set autodelete
public autodelete ( boolean $flag ) : self
$flag boolean Flag
return self This object
    public function autodelete($flag)
    {
        $this->attributes['autodelete'] = (bool) $flag;
        return $this;
    }

Usage Example

Beispiel #1
0
 /**
  * Test: Auto delete
  *
  * @covers \Phue\Command\CreateSchedule::autodelete
  */
 public function testAutoDelete()
 {
     $x = new CreateSchedule();
     $command = $x->autodelete(true);
     // Ensure property is set properly
     $this->assertAttributeContains(true, 'attributes', $command);
     // Ensure self object is returned
     $this->assertEquals($command, $command->autodelete(true));
 }