function backendCase::testBackendFunctionResult

8.0.x backendTest.php backendCase::testBackendFunctionResult()
6.x backendTest.php backendCase::testBackendFunctionResult()
7.x backendTest.php backendCase::testBackendFunctionResult()
5.x backendTest.php backendCase::testBackendFunctionResult()
master backendTest.php backendCase::testBackendFunctionResult()

Covers the following target responsibilities.

  • Insures that function result is returned in --backend mode

File

tests/backendTest.php, line 120
We choose to test the backend system in two parts. - Origin. These tests assure that we are generate a proper ssh command when a backend invoke is needed. - Target. These tests assure that drush generates a delimited JSON array …

Class

backendCase

Code

function testBackendFunctionResult() {
  $php = "return 'bar'";
  $this->drush('php-eval', array($php), array('backend' => NULL));
  $parsed = parse_backend_output($this->getOutput());
  // assert that $parsed has 'bar'
  $this->assertEquals("'bar'", var_export($parsed['object'], TRUE));
}