class BlockItemsPerPageUpdateTest
Same name and namespace in other branches
- 11.x core/modules/views/tests/src/Functional/Update/BlockItemsPerPageUpdateTest.php \Drupal\Tests\views\Functional\Update\BlockItemsPerPageUpdateTest
Tests Block Items Per Page Update.
Attributes
#[Group('Update')]
#[CoversFunction('views_post_update_block_items_per_page')]
#[RunTestsInSeparateProcesses]
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Tests\DrupalTestCaseTrait, \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \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\PhpUnitCompatibilityTrait, \Drupal\TestTools\Extension\DeprecationBridge\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\FunctionalTests\Update\UpdatePathTestBase uses \Drupal\Tests\UpdatePathTestTrait extends \Drupal\Tests\BrowserTestBase
- class \Drupal\Tests\views\Functional\Update\BlockItemsPerPageUpdateTest extends \Drupal\FunctionalTests\Update\UpdatePathTestBase
- class \Drupal\FunctionalTests\Update\UpdatePathTestBase uses \Drupal\Tests\UpdatePathTestTrait extends \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of BlockItemsPerPageUpdateTest
File
-
core/
modules/ views/ tests/ src/ Functional/ Update/ BlockItemsPerPageUpdateTest.php, line 16
Namespace
Drupal\Tests\views\Functional\UpdateView source
final class BlockItemsPerPageUpdateTest extends UpdatePathTestBase {
/**
* {@inheritdoc}
*/
protected function setDatabaseDumpFiles() : void {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../../system/tests/fixtures/update/drupal-10.3.0.filled.standard.php.gz',
__DIR__ . '/../../../../../system/tests/fixtures/update/uninstall-history.php',
__DIR__ . '/../../../fixtures/update/views-block-items-per-page.php',
];
}
/**
* Tests changing an `items_per_page` setting of `none` to NULL.
*/
public function testUpdateItemsPerPage() : void {
$settings = Block::load('olivero_who_s_online')?->get('settings');
$this->assertIsArray($settings);
$this->assertSame('none', $settings['items_per_page']);
$this->runUpdates();
$settings = Block::load('olivero_who_s_online')?->get('settings');
$this->assertIsArray($settings);
$this->assertNull($settings['items_per_page']);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.