public function AcquiaSPITestCase::testAcquiaSPIDataStore in Acquia Connector 7.2
Same name and namespace in other branches
- 7.3 acquia_spi/tests/acquia_spi.test \AcquiaSPITestCase::testAcquiaSpiDataStore()
File
- acquia_spi/
tests/ acquia_spi.test, line 115
Class
- AcquiaSPITestCase
- Tests the functionality of the Acquia SPI module.
Code
public function testAcquiaSPIDataStore() {
$data = array(
'foo' => 'bar',
);
acquia_spi_data_store_set(array(
'testdata' => $data,
));
$stored_data = acquia_spi_data_store_get(array(
'testdata',
));
$diff = array_diff($stored_data['testdata'], $data);
$this
->assertTrue(empty($diff), 'Storage can store simple array');
$this
->drupalGet('/node');
// Platform data should have been written.
$stored = acquia_spi_data_store_get(array(
'platform',
));
$diff = array_diff(array_keys($stored['platform']), $this->platformKeys);
$this
->assertTrue(empty($diff), 'Platform element contains expected keys');
}