function RegistryParseFileTestCase::testRegistryParseFile

7.x registry.test RegistryParseFileTestCase::testRegistryParseFile()

testRegistryParseFile

File

drupal-7.x/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)));
  }
}