Bolt\Tests\Nut\UserRoleAddTest::testRoleExists PHP Method

testRoleExists() public method

public testRoleExists ( )
    public function testRoleExists()
    {
        $app = $this->getApp();
        $app['users'] = $this->getUserMockWithReturns(true);
        $command = new UserRoleAdd($app);
        $tester = new CommandTester($command);
        $tester->execute(['username' => 'test', 'role' => 'admin']);
        $result = $tester->getDisplay();
        $this->assertRegExp('/already has role/', trim($result));
    }