function DevelCommandsTest::testCommands
Same name in other branches
- 5.x tests/src/Functional/DevelCommandsTest.php \Drupal\Tests\devel\Functional\DevelCommandsTest::testCommands()
Tests drush commands.
File
-
tests/
src/ Functional/ DevelCommandsTest.php, line 35
Class
- DevelCommandsTest
- @coversDefaultClass \Drupal\devel\Commands\DevelCommands @group devel
Namespace
Drupal\Tests\devel\FunctionalCode
public function testCommands() {
$this->drush('devel:token', [], [
'format' => 'json',
]);
$output = $this->getOutputFromJSON();
$tokens = array_column($output, 'token');
$this->assertContains('account-name', $tokens);
$this->drush('devel:services', [], [
'format' => 'json',
]);
$output = $this->getOutputFromJSON();
$this->assertContains('current_user', $output);
}