-
Notifications
You must be signed in to change notification settings - Fork 0
/
SamTestCommands.php
37 lines (32 loc) · 1022 Bytes
/
SamTestCommands.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
namespace Drupal\sam_test\Commands;
use Drush\Commands\DrushCommands;
use Drush\SiteAlias\SiteAliasManagerAwareInterface;
use Drush\SiteAlias\SiteAliasManagerAwareTrait;
class SamTestCommands extends DrushCommands implements SiteAliasManagerAwareInterface {
use SiteAliasManagerAwareTrait;
/**
* Test to run $this->siteAliasManager()->getSelf();
*
* @command sam:test
* @aliases sam-test
* @usage drush sam:test
* Test that `implements SiteAliasManagerAwareInterface` is working correctly.
* @handle-remote-commands true
*/
public function example() {
$alias = $this->siteAliasManager()->getSelf();
}
/**
* Test to run $this->siteAliasManager()->searchLocations();
*
* @command sam:test2
* @aliases sam-test2
* @usage drush sam:test2
* Test that `implements SiteAliasManagerAwareInterface` is working correctly.
* @handle-remote-commands true
*/
public function example_two() {
$alias = $this->siteAliasManager()->searchLocations();
}
}