function BlockItemsPerPageUpdateTest::testUpdateItemsPerPage

Tests changing an `items_per_page` setting of `none` to NULL.

File

core/modules/views/tests/src/Functional/Update/BlockItemsPerPageUpdateTest.php, line 29

Class

BlockItemsPerPageUpdateTest
@group Update @covers views_post_update_block_items_per_page

Namespace

Drupal\Tests\views\Functional\Update

Code

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.