public function HijriAdministrationTest::testAdministration in Hijri 1.0.x
Same name and namespace in other branches
- 3.0.x tests/src/Functional/HijriAdministrationTest.php \Drupal\Tests\hijri\Functional\HijriAdministrationTest::testAdministration()
Tests configuring hijri.
File
- tests/
Functional/ HijriAdministrationTest.php, line 43
Class
Namespace
Drupal\Tests\hijri\FunctionalCode
public function testAdministration() {
$this
->drupalGet('admin/config/regional/date-time/hijri');
$this->assert
->statusCodeEquals(403);
$this
->drupalLogin($this
->createUser([
'administer hijri',
]));
$this
->drupalGet('admin/config/regional/date-time/hijri');
$this->assert
->statusCodeEquals(200);
$edit = [
'hijri_correction_value' => 0,
'hijri_types[]' => [
'article',
],
'hijri_display' => 'short',
'hijri_comment_display' => 'short',
'hijri_display_block' => 'short',
];
$this
->submitForm($edit, 'Save configuration');
$this->assert
->pageTextContainsOnce('The configuration options have been saved.');
$this
->drupalGet('admin/config/regional/date-time/hijri');
}