-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Drupal support in Codeception, etc.
- Loading branch information
1 parent
422ef63
commit 01b23ed
Showing
5 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,6 @@ | |
# Ignore composer.lock & vendor/ | ||
composer.lock | ||
vendor/ | ||
|
||
# Ignore Vim swap files. | ||
*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
use Drupal\user\Entity\User; | ||
|
||
use Drupal\os2forms_egir\GIRUtils; | ||
|
||
|
||
class GIRUtilsTest extends \Codeception\Test\Unit | ||
{ | ||
/** | ||
* @var \UnitTester | ||
*/ | ||
protected $tester; | ||
|
||
protected function _before() | ||
{ | ||
} | ||
|
||
protected function _after() | ||
{ | ||
} | ||
|
||
// tests | ||
public function testGetUserData() | ||
{ | ||
$language = \Drupal::languageManager()->getCurrentLanguage()->getId(); | ||
|
||
$user = \Drupal\user\Entity\User::create(); | ||
$user->enforceIsNew(); | ||
$user->setPassword('password'); | ||
$user->setEmail('[email protected]'); | ||
$user->setUsername('egir5'); | ||
$user->set("init", 'mail'); | ||
$user->set("langcode", $language); | ||
$user->set("preferred_langcode", $language); | ||
$user->set("preferred_admin_langcode", $language); | ||
$user->activate(); | ||
$user->save(); | ||
$name = $user->email; // GIRUtils::getUserData('egir', 'name'); | ||
$this->assertEquals($name, ''); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
class WebformHandlerCest | ||
{ | ||
public function _before(UnitTester $I) | ||
{ | ||
} | ||
|
||
// tests | ||
public function tryToTest(UnitTester $I) | ||
{ | ||
} | ||
} |