Phue\Command\CreateSchedule::command PHP Method

command() public method

Set command
public command ( Phue\Command\ActionableInterface $command ) : self
$command Phue\Command\ActionableInterface Actionable command
return self This object
    public function command(ActionableInterface $command)
    {
        $this->command = $command;
        return $this;
    }

Usage Example

Example #1
0
 /**
  * Test: Set command
  *
  * @covers \Phue\Command\CreateSchedule::command
  */
 public function testCommand()
 {
     $x = new CreateSchedule();
     $command = $x->command($this->mockCommand);
     // Ensure properties are set properly
     $this->assertAttributeEquals($this->mockCommand, 'command', $command);
     // Ensure self object is returned
     $this->assertEquals($command, $command->command($this->mockCommand));
 }