function AmountFormattingFormWebTest::testListing in Currency 8.3
Same name in this branch
- 8.3 tests/src/Functional/Controller/AmountFormattingFormWebTest.php \Drupal\Tests\currency\Functional\Controller\AmountFormattingFormWebTest::testListing()
- 8.3 tests/src/Functional/Form/AmountFormattingFormWebTest.php \Drupal\Tests\currency\Functional\Form\AmountFormattingFormWebTest::testListing()
Tests listing().
File
- tests/
src/ Functional/ Controller/ AmountFormattingFormWebTest.php, line 24
Class
Namespace
Drupal\Tests\currency\Functional\ControllerCode
function testListing() {
$account = $this
->drupalCreateUser(array(
'access administration pages',
));
$this
->drupalLogin($account);
$this
->drupalGet('admin/config/regional/currency-formatting');
$this
->assertResponse('403');
$account = $this
->drupalCreateUser(array(
'currency.amount_formatting.administer',
));
$this
->drupalLogin($account);
$this
->drupalGet('admin/config/regional/currency-formatting');
$this
->assertResponse('200');
$this
->assertFieldChecked('edit-default-plugin-id-currency-basic');
$this
->drupalPostForm(NULL, array(), t('Save configuration'));
}