Phue\Test\GroupTest::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\\SetGroupAttributes'))->will($this->returnValue($this->group));
        // Ensure setName returns self
        $this->assertEquals($this->group, $this->group->setName('new name'));
        // Ensure new name can be retrieved by getName
        $this->assertEquals('new name', $this->group->getName());
    }