Skip to content
Snippets Groups Projects
Select Git revision
  • d6217df82fc964d59b59e7f9a7bd88f5615ac0a2
  • 11.x default protected
  • 11.2.x protected
  • 10.6.x protected
  • 10.5.x protected
  • 11.1.x protected
  • 10.4.x protected
  • 11.0.x protected
  • 10.3.x protected
  • 7.x protected
  • 10.2.x protected
  • 10.1.x protected
  • 9.5.x protected
  • 10.0.x protected
  • 9.4.x protected
  • 9.3.x protected
  • 9.2.x protected
  • 9.1.x protected
  • 8.9.x protected
  • 9.0.x protected
  • 8.8.x protected
  • 10.5.1 protected
  • 11.2.2 protected
  • 11.2.1 protected
  • 11.2.0 protected
  • 10.5.0 protected
  • 11.2.0-rc2 protected
  • 10.5.0-rc1 protected
  • 11.2.0-rc1 protected
  • 10.4.8 protected
  • 11.1.8 protected
  • 10.5.0-beta1 protected
  • 11.2.0-beta1 protected
  • 11.2.0-alpha1 protected
  • 10.4.7 protected
  • 11.1.7 protected
  • 10.4.6 protected
  • 11.1.6 protected
  • 10.3.14 protected
  • 10.4.5 protected
  • 11.0.13 protected
41 results

run-tests.sh

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    AggregatorUpdateTest.php 1.15 KiB
    <?php
    
    namespace Drupal\Tests\aggregator\Functional\Update;
    
    use Drupal\FunctionalTests\Update\UpdatePathTestBase;
    
    /**
     * Tests that node settings are properly updated during database updates.
     *
     * @group aggregator
     */
    class AggregatorUpdateTest extends UpdatePathTestBase {
    
      /**
       * {@inheritdoc}
       */
      protected function setDatabaseDumpFiles() {
        $this->databaseDumpFiles = [
          __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.filled.standard.php.gz',
        ];
      }
    
      /**
       * Tests that the 'Source feed' field is required.
       *
       * @see aggregator_update_8200()
       */
      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());
      }
    
    }