function AjaxBasePageNegotiatorTest::providerTestApplies

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php \Drupal\Tests\Core\Theme\AjaxBasePageNegotiatorTest::providerTestApplies()
  2. 8.9.x core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php \Drupal\Tests\Core\Theme\AjaxBasePageNegotiatorTest::providerTestApplies()
  3. 10 core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php \Drupal\Tests\Core\Theme\AjaxBasePageNegotiatorTest::providerTestApplies()

File

core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php, line 71

Class

AjaxBasePageNegotiatorTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Theme%21AjaxBasePageNegotiator.php/class/AjaxBasePageNegotiator/11.x" title="Defines a theme negotiator that deals with the active theme on ajax requests." class="local">\Drupal\Core\Theme\AjaxBasePageNegotiator</a> @group Theme

Namespace

Drupal\Tests\Core\Theme

Code

public static function providerTestApplies() {
    $data = [];
    $data['empty'] = [
        [],
        FALSE,
    ];
    $data['no_theme'] = [
        [
            'ajax_page_state' => [
                'theme' => '',
                'theme_token' => '',
            ],
        ],
        FALSE,
    ];
    $data['valid_theme_empty_theme_token'] = [
        [
            'ajax_page_state' => [
                'theme' => 'claro',
                'theme_token' => '',
            ],
        ],
        TRUE,
    ];
    $data['valid_theme_valid_theme_token'] = [
        [
            'ajax_page_state' => [
                'theme' => 'claro',
                'theme_token' => 'valid_theme_token',
            ],
        ],
        TRUE,
    ];
    return $data;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.