3 namespace Drupal\aggregator\Tests\Update;
5 use Drupal\system\Tests\Update\UpdatePathTestBase;
8 * Tests that node settings are properly updated during database updates.
12 class AggregatorUpdateTest extends UpdatePathTestBase {
17 protected function setDatabaseDumpFiles() {
18 $this->databaseDumpFiles = [
19 __DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.filled.standard.php.gz',
24 * Tests that the 'Source feed' field is required.
26 * @see aggregator_update_8200()
28 public function testSourceFeedRequired() {
29 // Check that the 'fid' field is not required prior to the update.
30 $field_definition = \Drupal::entityDefinitionUpdateManager()->getFieldStorageDefinition('fid', 'aggregator_item');
31 $this->assertFalse($field_definition->isRequired());
36 // Check that the 'fid' field is now required.
37 $field_definition = \Drupal::entityDefinitionUpdateManager()->getFieldStorageDefinition('fid', 'aggregator_item');
38 $this->assertTrue($field_definition->isRequired());