public function FacetapiApiFunctions::testSaveFacetStatus in Facet API 7
Same name and namespace in other branches
- 7.2 tests/facetapi.test \FacetapiApiFunctions::testSaveFacetStatus()
Tests facetapi_save_facet_status() API functions.
See also
facetapi_save_facet_disabled()
File
- tests/
facetapi.test, line 382 - Tests for the Facet API module.
Class
- FacetapiApiFunctions
- Test cases for low level API functions.
Code
public function testSaveFacetStatus() {
list($facet, $realm, $adapter) = $this
->facetapiLoadObjects();
facetapi_save_facet_enabled($adapter, $realm, $facet);
$enabled = facetapi_facet_enabled('facetapi_test', 'nodisplay', 'enabled');
$this
->assertTrue($enabled, t('Facet enabled by facetapi_save_facet_enabled().'), 'Facet API');
facetapi_save_facet_disabled($adapter, $realm, $facet);
$enabled = facetapi_facet_enabled('facetapi_test', 'nodisplay', 'enabled');
$this
->assertFalse($enabled, t('Facet disabled by facetapi_save_facet_disabled().'), 'Facet API');
}