You are here

public function AcquiaSPITestCase::testAcquiaSpiDataStore in Acquia Connector 7.3

Same name and namespace in other branches
  1. 7.2 acquia_spi/tests/acquia_spi.test \AcquiaSPITestCase::testAcquiaSPIDataStore()

Needs comment.

File

acquia_spi/tests/acquia_spi.test, line 219

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');
}