Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/upstream/4.0-dev' into 4.0-dev-…
Browse files Browse the repository at this point in the history
…installation-PR

# Conflicts:
#	installation/language/en-GB/en-GB.ini
  • Loading branch information
laoneo committed Oct 5, 2017
2 parents 2cf57b0 + f29dfba commit e3474ed
Show file tree
Hide file tree
Showing 1,283 changed files with 126,659 additions and 136,700 deletions.
20 changes: 12 additions & 8 deletions .gitignore
Expand Up @@ -221,16 +221,20 @@ Desktop.ini
/libraries/vendor/zendframework/zend-diactoros/README.md

# System Test related files
tests/codeception/acceptance.suite.yml
tests/codeception/_support/_generated/*TesterActions.php
tests/codeception/joomla-cms*
tests/codeception/_output*
selenium-server-standalone.jar
/libraries/vendor/codeception
/libraries/vendor/behat
/libraries/vendor/consolidation
/libraries/vendor/joomla/test-system
/libraries/vendor/league/
/libraries/vendor/phpdocumentor/
/libraries/vendor/phpspec/
/libraries/vendor/phpunit/
/libraries/vendor/sebastian/
/libraries/vendor/squizlabs/

selenium.log
tests/codeception/cache
tests/codeception/_output
tests/codeception/vendor
composer.phar
/test-install

# Build related
RoboFile.ini
2 changes: 1 addition & 1 deletion RoboFile.dist.ini
@@ -1,6 +1,6 @@
; If you want to setup your test website (document root) in a different folder, you can do that here.
; You can also set an absolute path, i.e. /path/to/my/cms/folder
cmsPath = tests/codeception/joomla-cms
cmsPath = test-install

; (Linux / Mac only) If you want to set a different owner for the CMS root folder, you can set it here.
localUser =
56 changes: 29 additions & 27 deletions RoboFile.php
Expand Up @@ -15,7 +15,7 @@
*
* @see http://robo.li/
*/
require_once __DIR__ . '/tests/codeception/vendor/autoload.php';
require_once __DIR__ . '/libraries/vendor/autoload.php';

if (!defined('JPATH_BASE'))
{
Expand All @@ -31,16 +31,21 @@
*/
class RoboFile extends \Robo\Tasks
{
// Load tasks from composer, see composer.json
use \Joomla\Jorobo\Tasks\loadTasks;

/**
* Path to the codeception tests folder
* Path to the vendor folder
*
* @var string
* @since 3.7.3
*/
private $testsPath = 'tests/codeception/';
private $vendorPath = 'libraries/vendor/';

/**
* Path to the tests
*
* @var string
* @since __DEPLOY_VERSION__
*/
private $testsPath = 'libraries/vendor/joomla/test-system/src/';

/**
* Local configuration parameters
Expand Down Expand Up @@ -119,14 +124,14 @@ private function getTestingPath()
{
if (empty($this->configuration->cmsPath))
{
return $this->testsPath . 'joomla-cms';
return 'test-install';
}

if (!file_exists(dirname($this->configuration->cmsPath)))
{
$this->say('CMS path written in local configuration does not exists or is not readable');

return $this->testsPath . 'joomla-cms';
return 'test-install';
}

return $this->configuration->cmsPath;
Expand Down Expand Up @@ -159,7 +164,7 @@ public function createTestingSite($useHtaccess = false)
}
}

$exclude = ['tests', 'tests-phpunit', '.run', '.github', '.git'];
$exclude = ['tests', 'tests-phpunit', '.run', '.github', '.git', 'test-install', 'libraries/vendor/codeception', 'libraries/vendor/behat', 'libraries/vendor/joomla-projects'];

$this->copyJoomla($this->cmsPath, $exclude);

Expand All @@ -174,7 +179,7 @@ public function createTestingSite($useHtaccess = false)
{
$this->say('Renaming htaccess.txt to .htaccess');
$this->_copy('./htaccess.txt', $this->cmsPath . '/.htaccess');
$this->_exec('sed -e "s,# RewriteBase /,RewriteBase /tests/codeception/joomla-cms,g" -in-place tests/codeception/joomla-cms/.htaccess');
$this->_exec('sed -e "s,# RewriteBase /,RewriteBase /test-install/joomla-cms,g" -in-place test-install/joomla-cms/.htaccess');
}
}

Expand Down Expand Up @@ -240,9 +245,9 @@ protected function copyJoomla($dst, $exclude = array())
private function getComposer()
{
// Make sure we have Composer
if (!file_exists($this->testsPath . 'composer.phar'))
if (!file_exists($this->vendorPath . 'composer.phar'))
{
$this->_exec('curl -o ' . $this->testsPath . 'composer.phar --retry 3 --retry-delay 5 -sS https://getcomposer.org/installer | php');
$this->_exec('curl -o ' . $this->vendorPath . 'composer.phar --retry 3 --retry-delay 5 -sS https://getcomposer.org/installer | php');
}
}

Expand All @@ -257,11 +262,11 @@ public function runSelenium()
{
if (!$this->isWindows())
{
$this->_exec($this->testsPath . "vendor/bin/selenium-server-standalone " . $this->getWebDriver() . ' >> selenium.log 2>&1 &');
$this->_exec($this->vendorPath . "bin/selenium-server-standalone " . $this->getWebDriver() . ' >> selenium.log 2>&1 &');
}
else
{
$this->_exec("START java.exe -jar " . $this->getWebDriver() . ' tests\codeception\vendor\joomla-projects\selenium-server-standalone\bin\selenium-server-standalone.jar ');
$this->_exec("START java.exe -jar " . $this->getWebDriver() . ' ' . $this->vendorPath . 'joomla-projects\selenium-server-standalone\bin\selenium-server-standalone.jar ');
}

sleep(3);
Expand All @@ -284,22 +289,19 @@ public function runTests($opts = ['use-htaccess' => false, 'env' => 'desktop'])

$this->createTestingSite($opts['use-htaccess']);

$this->getComposer();
$this->taskComposerInstall($this->testsPath . 'composer.phar')->run();

$this->runSelenium();

// Make sure to run the build command to generate AcceptanceTester
if ($this->isWindows())
{
$this->_exec('php ' . $this->getWindowsPath($this->testsPath . 'vendor/bin/codecept') . ' build');
$pathToCodeception = $this->getWindowsPath($this->testsPath . 'vendor/bin/codecept');
$this->_exec('php ' . $this->getWindowsPath($this->vendorPath . 'bin/codecept') . ' build');
$pathToCodeception = $this->getWindowsPath($this->vendorPath . 'bin/codecept');
}
else
{
$this->_exec('php ' . $this->testsPath . 'vendor/bin/codecept build');
$this->_exec('php ' . $this->vendorPath . 'bin/codecept build');

$pathToCodeception = $this->testsPath . 'vendor/bin/codecept';
$pathToCodeception = $this->vendorPath . 'bin/codecept';
}

$this->taskCodecept($pathToCodeception)
Expand Down Expand Up @@ -336,7 +338,7 @@ public function runTest($pathToTestFile = null, $suite = 'acceptance')
$this->runSelenium();

// Make sure to run the build command to generate AcceptanceTester
$path = 'tests/codeception/vendor/bin/codecept';
$path = $this->vendorPath . 'bin/codecept';
$this->_exec('php ' . $this->isWindows() ? $this->getWindowsPath($path) : $path . ' build');

if (!$pathToTestFile)
Expand All @@ -345,7 +347,7 @@ public function runTest($pathToTestFile = null, $suite = 'acceptance')

$iterator = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator(
$this->testsPath . $suite,
$this->vendorPath . $suite,
RecursiveDirectoryIterator::SKIP_DOTS
),
RecursiveIteratorIterator::SELF_FIRST
Expand Down Expand Up @@ -377,7 +379,7 @@ public function runTest($pathToTestFile = null, $suite = 'acceptance')
$test = $tests[$testNumber];
}

$pathToTestFile = $this->testsPath . $suite . '/' . $test;
$pathToTestFile = $this->vendorPath . 'joomla/test-system/' . $suite . '/' . $test;

// Loading the class to display the methods in the class

Expand All @@ -389,7 +391,7 @@ public function runTest($pathToTestFile = null, $suite = 'acceptance')

if (isset($fileName[1]) && strripos($fileName[1], 'cest'))
{
require $this->testsPath . $suite . '/' . $test;
require $this->vendorPath . $suite . '/' . $test;

$className = explode(".", $fileName[1]);
$class_methods = get_class_methods($className[0]);
Expand Down Expand Up @@ -423,7 +425,7 @@ public function runTest($pathToTestFile = null, $suite = 'acceptance')
$pathToTestFile = $pathToTestFile . ':' . $method;
}

$testPathCodecept = $this->testsPath . 'vendor/bin/codecept';
$testPathCodecept = $this->vendorPath . 'bin/codecept';

$this->taskCodecept($this->isWindows() ? $this->getWindowsPath($testPathCodecept) : $testPathCodecept)
->test($pathToTestFile)
Expand Down Expand Up @@ -550,7 +552,7 @@ private function getSuiteConfig($suite = 'acceptance')
{
if (!$this->suiteConfig)
{
$this->suiteConfig = Symfony\Component\Yaml\Yaml::parse(file_get_contents("tests/codeception/{$suite}.suite.yml"));
$this->suiteConfig = Symfony\Component\Yaml\Yaml::parse(file_get_contents(__DIR__ . '/' . $suite . '.suite.yml'));
}

return $this->suiteConfig;
Expand Down
34 changes: 34 additions & 0 deletions acceptance.suite.yml
@@ -0,0 +1,34 @@
# Codeception Test Suite Configuration
#
# Suite for acceptance tests.
# Perform tests in browser using the WebDriver or PhpBrowser.
# If you need both WebDriver and PHPBrowser tests - create a separate suite.

class_name: AcceptanceTester
modules:
enabled:
- Asserts
- JoomlaBrowser
- Helper\Acceptance
config:
JoomlaBrowser:
url: 'http://localhost/test-install' # the url that points to the joomla installation at /tests/system/joomla-cms
browser: chrome
window_size: 1280x1024
username: 'admin' # UserName for the Administrator
password: 'admin' # Password for the Administrator
database host: 'localhost' # place where the Application is Hosted #server Address
database user: 'root' # MySQL Server user ID, usually root
database password: '' # MySQL Server password, usually empty or root
database name: 'test_joomla' # DB Name, at the Server
database type: 'mysqli' # type in lowercase one of the options: MySQL\MySQLi\PDO
database prefix: 'jos_' # DB Prefix for tables
install sample data: 'no' # Do you want to Download the Sample Data Along with Joomla Installation, then keep it Yes
sample data: 'Default English (GB) Sample Data' # Default Sample Data
admin email: 'admin@mydomain.com' # email Id of the Admin
language: 'English (United Kingdom)' # Language in which you want the Application to be Installed
Helper\Acceptance:
url: 'http://localhost/test-install' # 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

error_level: "E_ALL & ~E_STRICT & ~E_DEPRECATED"
23 changes: 0 additions & 23 deletions administrator/components/com_admin/Controller/Controller.php

This file was deleted.

@@ -0,0 +1,23 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Admin\Administrator\Controller;

defined('_JEXEC') or die;

use Joomla\CMS\MVC\Controller\BaseController;

/**
* Admin Controller
*
* @since 1.6
*/
class DisplayController extends BaseController
{

}
82 changes: 0 additions & 82 deletions administrator/components/com_admin/Controller/Profile.php

This file was deleted.

0 comments on commit e3474ed

Please sign in to comment.