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 125

Namespace

Unish

Class

backendCase
We choose to test the backend system in two parts.

Code

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