Skip to content

Commit

Permalink
Move AcceptanceHelper to the codeception default location for helpers (
Browse files Browse the repository at this point in the history
…joomla#111)

* Use default path for the AcceptanceHelper

* Use codeception defaults for helper files

* Order enabled modules alphabetical
  • Loading branch information
dneukirchen authored and yvesh committed Dec 12, 2016
1 parent 65d5171 commit a08f163
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 50 deletions.
43 changes: 0 additions & 43 deletions tests/codeception/_support/AcceptanceHelper.php

This file was deleted.

22 changes: 20 additions & 2 deletions tests/codeception/_support/Helper/Acceptance.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

namespace Helper;
use Codeception\Configuration;
use Codeception\Module;

/**
* Helper class for Acceptance.
Expand All @@ -18,7 +19,24 @@
*
* @since __DEPLOY_VERSION__
*/
class Acceptance extends \Codeception\Module
class Acceptance extends Module
{
protected static $acceptanceSuiteConfiguration = [];

/**
* Function to get Configuration from the acceptance.suite.yml to be used by a test
*
* @return array
*
* @since __DEPLOY_VERSION__
*/
public function getSuiteConfiguration()
{
if (empty(self::$acceptanceSuiteConfiguration))
{
self::$acceptanceSuiteConfiguration = Configuration::suiteSettings('acceptance', Configuration::config());
}

return self::$acceptanceSuiteConfiguration;
}
}
10 changes: 5 additions & 5 deletions tests/codeception/acceptance.suite.dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
class_name: AcceptanceTester
modules:
enabled:
- JoomlaBrowser
- AcceptanceHelper
- Asserts
- \Helper\JoomlaDb
- JoomlaBrowser
- Helper\Acceptance
- Helper\JoomlaDb
config:
JoomlaBrowser:
url: 'http://localhost/tests/codeception/joomla-cms3' # the url that points to the joomla installation at /tests/system/joomla-cms
Expand All @@ -30,10 +30,10 @@ modules:
sample data: 'Default English (GB) Sample Data' # Default Sample Data
admin email: '[email protected]' # email Id of the Admin
language: 'English (United Kingdom)' # Language in which you want the Application to be Installed
AcceptanceHelper:
Helper\Acceptance:
url: 'http://localhost/tests/codeception/joomla-cms3' # the url that points to the joomla installation at /tests/system/joomla-cms - we need it twice here
MicrosoftEdgeInsiders: false # set this to true, if you are on Windows Insiders
\Helper\JoomlaDb: # http://codeception.com/docs/modules/Db
Helper\JoomlaDb: # http://codeception.com/docs/modules/Db
dsn: 'mysql:host=localhost;dbname=test_joomla' # PDO DSN
user: 'root' # MySQL Server user
password: '' # MySQL Server password
Expand Down

0 comments on commit a08f163

Please sign in to comment.