function AggregatorUpdateTest::testSourceFeedRequired
Tests that the 'Source feed' field is required.
See also
File
-
core/
modules/ aggregator/ tests/ src/ Functional/ Update/ AggregatorUpdateTest.php, line 29
Class
- AggregatorUpdateTest
- Tests that node settings are properly updated during database updates.
Namespace
Drupal\Tests\aggregator\Functional\UpdateCode
public function testSourceFeedRequired() {
// Check that the 'fid' field is not required prior to the update.
$field_definition = \Drupal::entityDefinitionUpdateManager()->getFieldStorageDefinition('fid', 'aggregator_item');
$this->assertFalse($field_definition->isRequired());
// Run updates.
$this->runUpdates();
// Check that the 'fid' field is now required.
$field_definition = \Drupal::entityDefinitionUpdateManager()->getFieldStorageDefinition('fid', 'aggregator_item');
$this->assertTrue($field_definition->isRequired());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.