CakeDC\Users\Test\TestCase\Shell\UsersShellTest::testChangeRole PHP Method

testChangeRole() public method

Change role
public testChangeRole ( ) : void
return void
    public function testChangeRole()
    {
        $this->Shell = new UsersShell($this->io);
        $this->Shell->Users = $this->Users;
        $user = $this->Users->get('00000000-0000-0000-0000-000000000001');
        $this->assertSame('admin', $user['role']);
        $this->Shell->runCommand(['changeRole', 'user-1', 'another-role']);
        $user = $this->Users->get('00000000-0000-0000-0000-000000000001');
        $this->assertSame('another-role', $user['role']);
    }