You are here

public function AcquiaConnectorSpiTest::testNoObjectInSpiDataTests in Acquia Connector 8

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/AcquiaConnectorSpiTest.php \Drupal\Tests\acquia_connector\Functional\AcquiaConnectorSpiTest::testNoObjectInSpiDataTests()
  2. 3.x tests/src/Functional/AcquiaConnectorSpiTest.php \Drupal\Tests\acquia_connector\Functional\AcquiaConnectorSpiTest::testNoObjectInSpiDataTests()

Validate Acquia SPI data.

File

tests/src/Functional/AcquiaConnectorSpiTest.php, line 469

Class

AcquiaConnectorSpiTest
Tests the functionality of the Acquia SPI module.

Namespace

Drupal\Tests\acquia_connector\Functional

Code

public function testNoObjectInSpiDataTests() {

  // Connect site on non-error key and id.
  $this
    ->connectSite();
  $edit_fields = [
    'name' => $this->acqtestName,
    'machine_name' => $this->acqtestMachineName,
  ];
  $submit_button = 'Save configuration';
  $this
    ->drupalPostForm($this->settingsPath, $edit_fields, $submit_button);
  $spi = new SpiController(\Drupal::service('acquia_connector.client'), \Drupal::service('config.factory'), \Drupal::service('path_alias.manager'));
  $spi_data = $spi
    ->get();
  $this
    ->assertFalse($this
    ->isContainObjects($spi_data), 'SPI data does not contain PHP objects.');
}