You are here

public function FacetapiAdapterTestCase::testValidAdapter in Facet API 6.3

File

tests/facetapi.test, line 135
Tests for the Facet API module.

Class

FacetapiAdapterTestCase

Code

public function testValidAdapter() {

  // Tests loading of a valid adapter plugin, sets a semaphore to see if
  // singleton pattern is implemented.
  $adapter1 = $this
    ->loadAdapter('facetapi_test');
  $adapter1->semaphore = 'test';
  $adapter2 = $this
    ->loadAdapter('facetapi_test');
  $value = isset($adapter2->semaphore) && 'test' == $adapter2->semaphore;
  $this
    ->assertTrue($value, t('Singleton pattern implemented by facetapi_adapter_load().'));
}