You are here

function RegistryParseFileTestCase::testRegistryParseFile in Drupal 7

testRegistryParseFile

File

modules/simpletest/tests/registry.test, line 23

Class

RegistryParseFileTestCase

Code

function testRegistryParseFile() {
  _registry_parse_file($this->fileName, $this
    ->getFileContents());
  foreach (array(
    'className',
    'interfaceName',
  ) as $resource) {
    $foundName = db_query('SELECT name FROM {registry} WHERE name = :name', array(
      ':name' => $this->{$resource},
    ))
      ->fetchField();
    $this
      ->assertTrue($this->{$resource} == $foundName, t('Resource "@resource" found.', array(
      '@resource' => $this->{$resource},
    )));
  }
}