You are here

function DomainUnitTest::testDomainDefault in Domain Access 7.3

File

tests/domain.test, line 462
Simpletest for Domain Access.

Class

DomainUnitTest

Code

function testDomainDefault() {

  // Reset the static, and don't allow domain_default() to run domain_api().
  $domain = domain_default(TRUE, FALSE);
  $this
    ->assertTrue(empty($domain['path']), t('domain_default() didn\'t call domain_api when not being allowed to do so.'));

  // Now call it again and allow domain_default() to run domain_api().
  $domain = domain_default();
  $this
    ->assertTrue(!empty($domain['path']), t('domain_default() successfully purged static after being allowed to run domain_api().'));
}