DateFormatsLockedTest.php in Zircon Profile 8.0
File
core/modules/system/src/Tests/System/DateFormatsLockedTest.php
View source
<?php
namespace Drupal\system\Tests\System;
use Drupal\simpletest\WebTestBase;
class DateFormatsLockedTest extends WebTestBase {
public function testDateLocking() {
$this
->drupalLogin($this->rootUser);
$this
->drupalGet('admin/config/regional/date-time');
$this
->assertLinkByHref('admin/config/regional/date-time/formats/manage/short');
$this
->assertNoLinkByHref('admin/config/regional/date-time/formats/manage/html_date');
$this
->assertText('Fallback date format');
$this
->assertNoText('short (locked)');
$this
->drupalGet('admin/config/regional/date-time/formats/manage/short');
$this
->assertResponse(200);
$this
->drupalGet('admin/config/regional/date-time/formats/manage/html_date');
$this
->assertResponse(403);
$this
->drupalGet('admin/config/regional/date-time/formats/manage/short/delete');
$this
->assertResponse(200);
$this
->drupalGet('admin/config/regional/date-time/formats/manage/html_date/delete');
$this
->assertResponse(403);
}
}