function DevelCommandsTest::testCommands
Same name and namespace 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 <a href="/api/devel/src%21Commands%21DevelCommands.php/class/DevelCommands/4.x" title="Class DevelCommands." class="local">\Drupal\devel\Commands\DevelCommands</a> @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);
}