From c1e2a1b3bb3b276fa555e360371751e0959ff49f Mon Sep 17 00:00:00 2001 From: Elliot Boney Date: Sun, 12 Apr 2015 21:33:34 -0500 Subject: [PATCH 1/3] When loading tests, check if the test directory exists. Prevents an uncaught exception if you have a test type in one site, and not another. --- App/Lib/Codeception.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/App/Lib/Codeception.php b/App/Lib/Codeception.php index 76971be..d11f0e1 100644 --- a/App/Lib/Codeception.php +++ b/App/Lib/Codeception.php @@ -130,8 +130,15 @@ public function loadTests() if (! $active) break; + $testdir = "{$this->config['paths']['tests']}/{$type}/"; + + if (!is_dir($testdir)) { + // If no directory exists for the test type, continue + continue; + } + $files = new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator("{$this->config['paths']['tests']}/{$type}/", \FilesystemIterator::SKIP_DOTS), + new \RecursiveDirectoryIterator($testdir, \FilesystemIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST ); From 9393671ef8c37295ddfd803c0f1ee59ccf81b512 Mon Sep 17 00:00:00 2001 From: Elliot Boney Date: Sun, 12 Apr 2015 21:45:50 -0500 Subject: [PATCH 2/3] Fixes jayhealey/Webception#27 --- App/Templates/layout/master.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App/Templates/layout/master.html b/App/Templates/layout/master.html index 1399d5b..47b2122 100755 --- a/App/Templates/layout/master.html +++ b/App/Templates/layout/master.html @@ -20,7 +20,7 @@ {% if codeception.site.hasChoices() %} {% endif %} From b92af839d3298a21ef66338bf22565f73e55d96e Mon Sep 17 00:00:00 2001 From: Elliot Boney Date: Mon, 13 Apr 2015 16:38:25 -0500 Subject: [PATCH 3/3] symlink config --- App/Config/codeception.php | 77 +-------------------------------- App/Templates/_cache/.gitignore | 0 2 files changed, 1 insertion(+), 76 deletions(-) mode change 100644 => 120000 App/Config/codeception.php mode change 100644 => 100755 App/Templates/_cache/.gitignore diff --git a/App/Config/codeception.php b/App/Config/codeception.php deleted file mode 100644 index 772ec04..0000000 --- a/App/Config/codeception.php +++ /dev/null @@ -1,76 +0,0 @@ - array( - - 'Webception' => dirname(__FILE__) .'/../../codeception.yml', - - ), - - /* - |-------------------------------------------------------------------------- - | Codeception Executable - |-------------------------------------------------------------------------- - | - | Codeception is installed as a dependancy of Webception via Composer. - | - | You might need to set 'sudo chmod a+x vendor/bin/codecept' to allow Apache - | to execute the Codeception executable. - | - */ - - 'executable' => dirname(__FILE__) .'/../../vendor/bin/codecept', - - /* - |-------------------------------------------------------------------------- - | You get to decide which type of tests get included. - |-------------------------------------------------------------------------- - */ - - 'tests' => array( - 'acceptance' => TRUE, - 'functional' => TRUE, - 'unit' => TRUE, - ), - - /* - |-------------------------------------------------------------------------- - | When we scan for the tests, we need to ignore the following files. - |-------------------------------------------------------------------------- - */ - - 'ignore' => array( - 'WebGuy.php', - 'TestGuy.php', - 'CodeGuy.php', - '_bootstrap.php', - '.DS_Store', - ), - - /* - |-------------------------------------------------------------------------- - | Setting the location as the current file helps with offering information - | about where this configuration file sits on the server. - |-------------------------------------------------------------------------- - */ - - 'location' => __FILE__, -); diff --git a/App/Config/codeception.php b/App/Config/codeception.php new file mode 120000 index 0000000..9d03c8a --- /dev/null +++ b/App/Config/codeception.php @@ -0,0 +1 @@ +../../../codeception.php \ No newline at end of file diff --git a/App/Templates/_cache/.gitignore b/App/Templates/_cache/.gitignore old mode 100644 new mode 100755