You are here

public function BuildTestBase::assertCommandExitCode in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/BuildTests/Framework/BuildTestBase.php \Drupal\BuildTests\Framework\BuildTestBase::assertCommandExitCode()

Asserts that the last command returned the specified exit code.

Parameters

int $expected_code: The expected process exit code.

1 call to BuildTestBase::assertCommandExitCode()
BuildTestBase::assertCommandSuccessful in core/tests/Drupal/BuildTests/Framework/BuildTestBase.php
Asserts that the last command ran without error.

File

core/tests/Drupal/BuildTests/Framework/BuildTestBase.php, line 302

Class

BuildTestBase
Provides a workspace to test build processes.

Namespace

Drupal\BuildTests\Framework

Code

public function assertCommandExitCode($expected_code) {
  $this
    ->assertEquals($expected_code, $this->commandProcess
    ->getExitCode(), 'COMMAND: ' . $this->commandProcess
    ->getCommandLine() . "\n" . 'OUTPUT: ' . $this->commandProcess
    ->getOutput() . "\n" . 'ERROR: ' . $this->commandProcess
    ->getErrorOutput() . "\n");
}