class JsonApiUpdatePathTest
Tests adding retry-after header settings.
@group legacy @group jsonapi
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\FunctionalTests\AssertLegacyTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\FunctionalTests\Update\UpdatePathTestBase uses \Drupal\Tests\UpdatePathTestTrait extends \Drupal\Tests\BrowserTestBase
- class \Drupal\Tests\jsonapi\Functional\Update\JsonApiUpdatePathTest extends \Drupal\FunctionalTests\Update\UpdatePathTestBase
- class \Drupal\FunctionalTests\Update\UpdatePathTestBase uses \Drupal\Tests\UpdatePathTestTrait extends \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of JsonApiUpdatePathTest
File
-
core/
modules/ jsonapi/ tests/ src/ Functional/ Update/ JsonApiUpdatePathTest.php, line 13
Namespace
Drupal\Tests\jsonapi\Functional\UpdateView source
class JsonApiUpdatePathTest extends UpdatePathTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../../system/tests/fixtures/update/drupal-9.0.0.bare.standard.php.gz',
__DIR__ . '/../../../../tests/fixtures/update/jsonapi.php',
];
}
/**
* Tests adding retry-after header settings.
*
* @see jsonapi_update_9401()
*/
public function testUpdate9401() {
$config = $this->config('jsonapi.settings');
$this->assertTrue($config->get('read_only'));
$this->assertNull($config->get('maintenance_header_retry_seconds'));
// Run updates.
$this->runUpdates();
$config = $this->config('jsonapi.settings');
$this->assertTrue($config->get('read_only'));
$header_settings = $config->get('maintenance_header_retry_seconds');
$this->assertSame(5, $header_settings['min']);
$this->assertSame(10, $header_settings['max']);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.