public static function ALProfilesAPI::setTestInstance in Acquia Lift Connector 7
Same name and namespace in other branches
- 7.2 acquia_lift_profiles/includes/acquia_lift_profiles.classes.inc \ALProfilesAPI::setTestInstance()
Sets the ALProfilesAPI instance with dummy creds and a dummy HttpClient.
This is used during simpletest web tests.
2 calls to ALProfilesAPI::setTestInstance()
- ALProfilesAPI::getInstance in acquia_lift_profiles/
includes/ acquia_lift_profiles.classes.inc - Singleton factory method.
- ALProfilesWebTest::testSyncEvents in acquia_lift_profiles/
tests/ acquia_lift_profiles.test
File
- acquia_lift_profiles/
includes/ acquia_lift_profiles.classes.inc, line 141 - Provides an agent type for Acquia Lift Profiles
Class
- ALProfilesAPI
- @file Provides an agent type for Acquia Lift Profiles
Code
public static function setTestInstance($broken_http_client = FALSE) {
module_load_include('inc', 'acquia_lift_profiles', 'tests/acquia_lift_profiles.test_classes');
self::$instance = new self('TESTACCOUNT', 'TESTSITE', 'http://api.example.com', 'testUser', 'testPass');
$test_data = variable_get('acquia_lift_profiles_web_test_data', array());
self::$instance
->setHttpClient(new DummyALProfilesHttpClient($broken_http_client, $test_data));
self::$instance
->setLogger(new AcquiaLiftTestLogger(TRUE));
}