function FieldUninstallValidatorTest::testValidateNoStorages
Same name in other branches
- 9 core/modules/field/tests/src/Unit/FieldUninstallValidatorTest.php \Drupal\Tests\field\Unit\FieldUninstallValidatorTest::testValidateNoStorages()
- 8.9.x core/modules/field/tests/src/Unit/FieldUninstallValidatorTest.php \Drupal\Tests\field\Unit\FieldUninstallValidatorTest::testValidateNoStorages()
- 10 core/modules/field/tests/src/Unit/FieldUninstallValidatorTest.php \Drupal\Tests\field\Unit\FieldUninstallValidatorTest::testValidateNoStorages()
@covers ::validate
File
-
core/
modules/ field/ tests/ src/ Unit/ FieldUninstallValidatorTest.php, line 42
Class
- FieldUninstallValidatorTest
- @coversDefaultClass \Drupal\field\FieldUninstallValidator @group field
Namespace
Drupal\Tests\field\UnitCode
public function testValidateNoStorages() : void {
$this->fieldUninstallValidator
->expects($this->once())
->method('getFieldStoragesByModule')
->willReturn([]);
$module = $this->randomMachineName();
$expected = [];
$reasons = $this->fieldUninstallValidator
->validate($module);
$this->assertEquals($expected, $reasons);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.