Eccube\Tests\Web\Admin\Setting\System\AuthorityControllerTest::testAuthoritySubmitWithoutAuthorityRole PHP Method

testAuthoritySubmitWithoutAuthorityRole() public method

count authority role = 0
    public function testAuthoritySubmitWithoutAuthorityRole()
    {
        $this->deleteAllRows(array('dtb_authority_role'));
        $form = array(array('Authority' => 0, 'deny_url' => '/test2'));
        $url = $this->app->url('admin_setting_system_authority');
        // makes the POST request
        $this->client->request('POST', $url, array('form' => array('AuthorityRoles' => $form, '_token' => 'dummy')));
        $redirectUrl = $this->app->url('admin_setting_system_authority');
        $this->assertTrue($this->client->getResponse()->isRedirect($redirectUrl));
        $this->expected = $form[0]['deny_url'];
        $AuthorityRole = $this->app['eccube.repository.authority_role']->findOneBy(array('deny_url' => $form[0]['deny_url']));
        $this->actual = $AuthorityRole->getDenyUrl();
        $this->verify();
    }