Bolt\Tests\Nut\UserRoleAddTest::testAdd PHP Метод

testAdd() публичный Метод

public testAdd ( )
    public function testAdd()
    {
        $app = $this->getApp();
        $app['users'] = $this->getUserMockWithReturns();
        $command = new UserRoleAdd($app);
        $tester = new CommandTester($command);
        $tester->execute(['username' => 'test', 'role' => 'admin']);
        $result = $tester->getDisplay();
        $this->assertEquals("User 'test' now has role 'admin'.", trim($result));
    }