Pantheon\Terminus\UnitTests\Commands\Site\Team\RoleCommandTest::testRoleCommand PHP Method

testRoleCommand() public method

Tests the site:team:role command
public testRoleCommand ( )
    public function testRoleCommand()
    {
        $message = 'message';
        $this->site->expects($this->once())->method('getFeature')->with('change_management')->willReturn(true);
        $this->user_membership->expects($this->once())->method('setRole')->with('admin')->willReturn($this->workflow);
        $this->workflow->expects($this->once())->method('checkProgress')->with()->willReturn(true);
        $this->workflow->expects($this->once())->method('getMessage')->with()->willReturn($message);
        $this->logger->expects($this->once())->method('log')->with($this->equalTo('notice'), $this->equalTo($message));
        $out = $this->command->role('mysite', '[email protected]', 'admin');
        $this->assertNull($out);
    }