public function VarnishTestCase::assertVarnishCommand in Varnish 7
Same name and namespace in other branches
- 6 varnish.test \VarnishTestCase::assertVarnishCommand()
Run a varnish command and make sure it worked for us.
Parameters
string $cmds: The command to execute.
3 calls to VarnishTestCase::assertVarnishCommand()
File
- ./
varnish.test, line 40 - Tests the basic functionality of Varnish.
Class
- VarnishTestCase
- Base class for Varnish Test Cases.
Code
public function assertVarnishCommand($cmds) {
$statuses = _varnish_terminal_run($cmds);
foreach ($statuses as $terminal => $commands) {
foreach ($commands as $command => $status) {
$this
->assertEqual($status['code'], '200', t('Command: %command
was executed properly.', array(
'%command' => $command,
)));
}
}
}