function BootstrapAutoloadTestCase::testAutoloadCase

Tests that autoloader name matching is not case sensitive.

File

drupal/modules/simpletest/tests/bootstrap.test, line 320

Class

BootstrapAutoloadTestCase
Tests the auto-loading behavior of the code registry.

Code

function testAutoloadCase() {

  // Test interface autoloader.
  $this
    ->assertTrue(drupal_autoload_interface('drupalautoloadtestinterface'), 'drupal_autoload_interface() recognizes <em>DrupalAutoloadTestInterface</em> in lower case.');

  // Test class autoloader.
  $this
    ->assertTrue(drupal_autoload_class('drupalautoloadtestclass'), 'drupal_autoload_class() recognizes <em>DrupalAutoloadTestClass</em> in lower case.');

  // Test trait autoloader.
  if (version_compare(PHP_VERSION, '5.4') >= 0) {
    $this
      ->assertTrue(drupal_autoload_trait('drupalautoloadtesttrait'), 'drupal_autoload_trait() recognizes <em>DrupalAutoloadTestTrait</em> in lower case.');
  }
}