From c31b6450138815758ff5c31811928b8d77309c52 Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Sat, 28 Dec 2019 10:35:36 +0100 Subject: [PATCH] Made acceptance tests work again Broken due to Codeception moving modules out of codeception/codeception --- e107_tests/composer.json | 3 ++- e107_tests/lib/deployers/cPanelDeployer.php | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/e107_tests/composer.json b/e107_tests/composer.json index 3a89538df..e5f767b04 100644 --- a/e107_tests/composer.json +++ b/e107_tests/composer.json @@ -3,9 +3,10 @@ "description": "Test harness for e107", "license": "GPL-3.0-or-later", "require-dev": { + "twig/twig": ">=1.28", "codeception/codeception": "^4.0", "codeception/module-asserts": "^1.1", "codeception/module-db": "^1.0", - "twig/twig": ">=1.28" + "codeception/module-phpbrowser": "^1.0" } } diff --git a/e107_tests/lib/deployers/cPanelDeployer.php b/e107_tests/lib/deployers/cPanelDeployer.php index df32da6bd..94b58dee2 100644 --- a/e107_tests/lib/deployers/cPanelDeployer.php +++ b/e107_tests/lib/deployers/cPanelDeployer.php @@ -350,9 +350,12 @@ class cPanelDeployer extends Deployer $i = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)); self::println("Adding app to temporary archive…"); $path = realpath($path); - foreach ($i as $relpath => $_value) + /** + * @var $file_info SplFileInfo + */ + foreach ($i as $file_info) { - $realpath = realpath($relpath); + $realpath = $file_info->getRealPath(); if (substr($realpath, 0, strlen($path)) === $path) $relpath = substr($realpath, strlen($path)); if (substr($relpath, -3) === "/.." ||