You are here

public function AjaxBasePageNegotiatorTest::providerTestApplies in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php \Drupal\Tests\Core\Theme\AjaxBasePageNegotiatorTest::providerTestApplies()

File

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

Class

AjaxBasePageNegotiatorTest
@coversDefaultClass \Drupal\Core\Theme\AjaxBasePageNegotiator @group Theme

Namespace

Drupal\Tests\Core\Theme

Code

public 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' => 'seven',
        'theme_token' => '',
      ],
    ],
    TRUE,
  ];
  $data['valid_theme_valid_theme_token'] = [
    [
      'ajax_page_state' => [
        'theme' => 'seven',
        'theme_token' => 'valid_theme_token',
      ],
    ],
    TRUE,
  ];
  return $data;
}