From fa2a61279a4ec25c99d6d9eb9f6978ea43ee534f Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Sun, 16 Dec 2018 16:31:08 +0100
Subject: [PATCH] Provide list of files in a config file Add additional
 arguments to ahoy commands

---
 ahoy.test.yml               | 8 ++++----
 src/Handler.php             | 2 +-
 templates/tests/phpcs.files | 3 +++
 3 files changed, 8 insertions(+), 5 deletions(-)
 create mode 100644 templates/tests/phpcs.files

diff --git a/ahoy.test.yml b/ahoy.test.yml
index 63ce6d5..35bb0b3 100644
--- a/ahoy.test.yml
+++ b/ahoy.test.yml
@@ -1,14 +1,14 @@
 ahoyapi: v2
 commands:
   phpcs:
-    cmd: ahoy d4d exec vendor/bin/phpcs --standard=DrupalPractice /var/www/html/web/modules/custom/ /var/www/html/web/profiles/custom/ /var/www/html/web/themes/custom/
+    cmd: ahoy d4d exec vendor/bin/phpcs --standard=DrupalPractice --file-list=/var/www/html/tests/phpcs.files "$@"
     usage: PHP coding standards
   phpunit:
-    cmd: ahoy d4d exec vendor/bin/phpunit --configuration /var/www/html/tests/phpunit.xml.dist
+    cmd: ahoy d4d exec vendor/bin/phpunit --configuration /var/www/html/tests/phpunit.xml.dist "$@"
     usage: PHP unit tests
   phpunit:list:suites:
-    cmd: ahoy d4d exec vendor/bin/phpunit --configuration /var/www/html/tests/phpunit.xml.dist --list-suites
+    cmd: ahoy d4d exec vendor/bin/phpunit --configuration /var/www/html/tests/phpunit.xml.dist --list-suites "$@"
     usage: List available test suites of PHP unit tests
   phpunit:list:groups:
-    cmd: ahoy d4d exec vendor/bin/phpunit --configuration /var/www/html/tests/phpunit.xml.dist --list-groups
+    cmd: ahoy d4d exec vendor/bin/phpunit --configuration /var/www/html/tests/phpunit.xml.dist --list-groups "$@"
     usage: List available test groups of PHP unit tests
diff --git a/src/Handler.php b/src/Handler.php
index 86a0f46..dfe1705 100644
--- a/src/Handler.php
+++ b/src/Handler.php
@@ -129,7 +129,7 @@ class Handler extends BaseHandler {
     }
 
     // Copy Test files.
-    foreach (['phpunit.xml.dist'] as $template) {
+    foreach (['phpcs.files', 'phpunit.xml.dist'] as $template) {
       $fs->copy($pluginRoot . '/templates/tests/' . $template, 'tests/' . $template);
     }
 
diff --git a/templates/tests/phpcs.files b/templates/tests/phpcs.files
new file mode 100644
index 0000000..1efc94e
--- /dev/null
+++ b/templates/tests/phpcs.files
@@ -0,0 +1,3 @@
+/var/www/html/web/modules/custom/
+/var/www/html/web/profiles/custom/
+/var/www/html/web/themes/custom/
-- 
GitLab