public function AcquiaSPITestCase::testAcquiaSPIMessages in Acquia Connector 7.2
Same name and namespace in other branches
- 7.3 acquia_spi/tests/acquia_spi.test \AcquiaSPITestCase::testAcquiaSpiMessages()
File
- acquia_spi/
tests/ acquia_spi.test, line 220
Class
- AcquiaSPITestCase
- Tests the functionality of the Acquia SPI module.
Code
public function testAcquiaSPIMessages() {
$this
->connectSite();
$spi_data = acquia_spi_get();
$response = acquia_spi_send_data($spi_data);
$this
->assertTrue(!isset($response['nspi_messages']), 'No NSPI messages when send_method not set');
$method = $this
->randomString();
$spi_data['send_method'] = $method;
$response = acquia_spi_send_data($spi_data);
$this
->assertIdentical($response['nspi_messages'][0], $method, 'NSPI messages when send_method is set');
$this
->drupalGet($this->status_report_url);
$this
->clickLink($this
->acquiaSPIStrings('spi-send-text'));
$this
->assertText(ACQUIA_SPI_METHOD_CALLBACK, 'NSPI messages printed on status page');
}