Phue\Command\CreateSchedule::status PHP Method

status() public method

Set status
public status ( $status ) : self
return self $status Status
    public function status($status)
    {
        $this->attributes['status'] = (string) $status;
        return $this;
    }

Usage Example

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