diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatAccessController.php b/core/modules/filter/lib/Drupal/filter/FilterFormatAccessController.php index 1bc04d5..a6721b8 100644 --- a/core/modules/filter/lib/Drupal/filter/FilterFormatAccessController.php +++ b/core/modules/filter/lib/Drupal/filter/FilterFormatAccessController.php @@ -9,7 +9,7 @@ use Drupal\Core\Entity\EntityAccessController; use Drupal\Core\Entity\EntityInterface; -use Drupal\user\UserInterface; +use Drupal\Core\Session\AccountInterface; /** * Defines the access controller for the filter format entity type. @@ -19,7 +19,7 @@ class FilterFormatAccessController extends EntityAccessController { /** * {@inheritdoc} */ - protected function checkAccess(EntityInterface $entity, $operation, $langcode, UserInterface $account) { + protected function checkAccess(EntityInterface $entity, $operation, $langcode, AccountInterface $account) { // Handle special cases up front. All users have access to the fallback // format. if ($entity->isFallbackFormat()) { diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatInterface.php b/core/modules/filter/lib/Drupal/filter/FilterFormatInterface.php index 1da5060..154e39e 100644 --- a/core/modules/filter/lib/Drupal/filter/FilterFormatInterface.php +++ b/core/modules/filter/lib/Drupal/filter/FilterFormatInterface.php @@ -48,7 +48,7 @@ public function setFilterConfig($instance_id, array $configuration); * TRUE if this format is the fallback format, FALSE otherwise. */ public function isFallbackFormat(); - + /** * Returns the machine-readable permission name for the text format. * diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php index dd89f9a..94d7465 100644 --- a/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php +++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php @@ -127,7 +127,7 @@ function testFilterAdmin() { $plain = 'plain_text'; // Check that the fallback format exists and cannot be disabled. - $this->assertTrue($plain->isFallbackFormat(), 'The fallback format is set to plain text.'); + $this->assertTrue($plain == filter_fallback_format(), 'The fallback format is set to plain text.'); $this->drupalGet('admin/config/content/formats'); $this->assertNoRaw('admin/config/content/formats/manage/' . $plain . '/disable', 'Disable link for the fallback format not found.'); $this->drupalGet('admin/config/content/formats/manage/' . $plain . '/disable');