public function FieldUninstallValidatorTest::testValidateNoStorages in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 41 - Contains \Drupal\Tests\field\Unit\FieldUninstallValidatorTest.
Class
- FieldUninstallValidatorTest
- @coversDefaultClass \Drupal\field\FieldUninstallValidator @group field
Namespace
Drupal\Tests\field\UnitCode
public function testValidateNoStorages() {
$this->fieldUninstallValidator
->expects($this
->once())
->method('getFieldStoragesByModule')
->willReturn([]);
$module = $this
->randomMachineName();
$expected = [];
$reasons = $this->fieldUninstallValidator
->validate($module);
$this
->assertSame($expected, $this
->castSafeStrings($reasons));
}