Phue\Test\ScheduleTest::testSetName PHP Method

testSetName() public method

Test: Setting name
public testSetName ( )
    public function testSetName()
    {
        // Stub client's sendCommand method
        $this->mockClient->expects($this->once())->method('sendCommand')->with($this->isInstanceOf('\\Phue\\Command\\SetScheduleAttributes'))->will($this->returnValue($this->schedule));
        // Ensure setName returns self
        $this->assertEquals($this->schedule, $this->schedule->setName('new name'));
        // Ensure new name can be retrieved by getName
        $this->assertEquals('new name', $this->schedule->getName());
    }