Skip to content

Commit a2d9a03

Browse files
committed
refactor(module): use driver when available (#2)
Fallback to CLI login if driver is not defined. Allows both acceptance and functional tests to login
1 parent ff61fc7 commit a2d9a03

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Codeception/Module/DrupalUser.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Codeception\TestInterface;
77
use Drupal\Core\Entity\EntityStorageInterface;
88
use Drupal\user\Entity\User;
9+
use Codeception\Util\Drush;
910
use Faker\Factory;
1011
use Codeception\Util\Drush;
1112
use Exception;
@@ -47,6 +48,13 @@ class DrupalUser extends Module {
4748
*/
4849
protected $users;
4950

51+
/**
52+
* Flag to note whether the CLI should be used for user actions.
53+
*
54+
* @var bool
55+
*/
56+
protected $useCli = FALSE;
57+
5058
/**
5159
* Default module configuration.
5260
*

0 commit comments

Comments
 (0)