You are here

public function AjaxLoaderTestCase::testEmptySettings in Ajax loader 7

Test all the things when settings are empty.

File

./ajax_loader.test, line 67
Test class to ensure proper working of module.

Class

AjaxLoaderTestCase
@file Test class to ensure proper working of module.

Code

public function testEmptySettings() {
  $this
    ->drupalLogin($this->user);

  // Set settings to empty array.
  variable_set('ajax_loader_settings', array());
  $this
    ->drupalGet('ajax-loader/test');

  // JS file should not be added.
  $this
    ->assertNoText('ajax-loader.js');

  // CSS files should not be added.
  $throbbers = ThrobberTypes::toArray();
  foreach ($throbbers as $throbber_class => $label) {
    $throbber = new $throbber_class();

    /** @var ThrobberInterface $throbber */
    $this
      ->assertNoText($throbber
      ->getCssFile());
  }
  $this
    ->assertNoText('throbber-general.css');
}