function ConfigEntityBaseUnitTest::testDisable

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php \Drupal\Tests\Core\Config\Entity\ConfigEntityBaseUnitTest::testDisable()
  2. 10 core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php \Drupal\Tests\Core\Config\Entity\ConfigEntityBaseUnitTest::testDisable()
  3. 9 core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php \Drupal\Tests\Core\Config\Entity\ConfigEntityBaseUnitTest::testDisable()
  4. 8.9.x core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php \Drupal\Tests\Core\Config\Entity\ConfigEntityBaseUnitTest::testDisable()

Tests disable.

Attributes

#[Depends('testSetStatus')]

File

core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php, line 634

Class

ConfigEntityBaseUnitTest
Tests Drupal\Core\Config\Entity\ConfigEntityBase.

Namespace

Drupal\Tests\Core\Config\Entity

Code

public function testDisable() : void {
  $this->entity
    ->setStatus(TRUE);
  $this->assertSame($this->entity, $this->entity
    ->disable());
  $this->assertFalse($this->entity
    ->status());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.