Skip to content

Commit

Permalink
EZP-30668: move core tests classes from AdminUI to BehatBundle
Browse files Browse the repository at this point in the history
  • Loading branch information
Marek Nocon committed Jun 21, 2019
1 parent 9f8b464 commit 541ed6c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions behat_suites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repository-forms:
- EzSystems\RepositoryForms\Behat\Context\ContentEditContext
- EzSystems\RepositoryForms\Behat\Context\ContentTypeContext
- EzSystems\RepositoryForms\Behat\Context\PagelayoutContext
- EzSystems\EzPlatformAdminUi\Behat\Helper\Hooks
- EzSystems\Behat\Browser\Context\Hooks
fieldtype_form:
paths:
- vendor/ezsystems/repository-forms/features/FieldTypeForm
Expand All @@ -24,4 +24,4 @@ repository-forms:
- EzSystems\RepositoryForms\Behat\Context\UserRegistrationContext
- Behat\MinkExtension\Context\MinkContext
- eZ\Bundle\EzPublishCoreBundle\Features\Context\YamlConfigurationContext
- EzSystems\EzPlatformAdminUi\Behat\Helper\Hooks
- EzSystems\Behat\Browser\Context\Hooks
6 changes: 3 additions & 3 deletions lib/Behat/Context/PagelayoutContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
use Behat\Behat\Context\SnippetAcceptingContext;
use Behat\MinkExtension\Context\RawMinkContext;
use eZ\Publish\Core\MVC\ConfigResolverInterface;
use EzSystems\EzPlatformAdminUi\Behat\Helper\EzEnvironmentConstants;
use EzSystems\EzPlatformAdminUi\Behat\Helper\InstallType;
use EzSystems\Behat\Core\Environment\EnvironmentConstants;
use EzSystems\Behat\Core\Environment\InstallType;
use PHPUnit\Framework\Assert as Assertion;

class PagelayoutContext extends RawMinkContext implements Context, SnippetAcceptingContext
Expand Down Expand Up @@ -51,7 +51,7 @@ public function itIsRenderedUsingTheConfiguredPagelayout()

public function getPageLayout(): string
{
$installType = EzEnvironmentConstants::getInstallType();
$installType = EnvironmentConstants::getInstallType();
switch ($installType) {
case InstallType::PLATFORM:
case InstallType::ENTERPRISE:
Expand Down
6 changes: 3 additions & 3 deletions lib/Behat/Context/UserRegistrationContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use eZ\Publish\API\Repository\Values\User\UserGroup;
use eZ\Publish\Core\Repository\Values\User\RoleCreateStruct;
use eZ\Publish\Core\Repository\Values\User\UserReference;
use EzSystems\EzPlatformAdminUi\Behat\Helper\EzEnvironmentConstants;
use EzSystems\Behat\Core\Environment\EnvironmentConstants;
use PHPUnit\Framework\Assert as Assertion;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Yaml\Yaml;
Expand Down Expand Up @@ -140,7 +140,7 @@ private function createRegistrationRole($withUserRegisterPolicy = true)
$roleService = $this->repository->getRoleService();
$roleCreateStruct = new RoleCreateStruct(['identifier' => $roleIdentifier]);

$policiesSet = explode(',', EzEnvironmentConstants::get('CREATE_REGISTRATION_ROLE_POLICIES'));
$policiesSet = explode(',', EnvironmentConstants::get('CREATE_REGISTRATION_ROLE_POLICIES'));
foreach ($policiesSet as $policy) {
[$module, $function] = explode('/', $policy);
$roleCreateStruct->addPolicy($roleService->newPolicyCreateStruct($module, $function));
Expand Down Expand Up @@ -255,7 +255,7 @@ public function iAmOnTheRegistrationConfirmationPage()
*/
public function iSeeARegistrationConfirmationMessage()
{
$this->assertSession()->pageTextContains(EzEnvironmentConstants::get('REGISTRATION_CONFIRMATION_MESSAGE'));
$this->assertSession()->pageTextContains(EnvironmentConstants::get('REGISTRATION_CONFIRMATION_MESSAGE'));
}

/**
Expand Down

0 comments on commit 541ed6c

Please # to comment.