From f14d48a35aea043665f4a0deb83efcb9d077281c Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Tue, 26 May 2015 15:47:05 +0200
Subject: [PATCH] Simplify phpunit test structure.

* One test suite for all tests.
* One file per class that is tested.

These changes should make it easier to add new tests.
---
 .../{ => lib/SimpleSAML}/Metadata/SAMLBuilderTest.php  |  0
 tests/{ => lib/SimpleSAML}/Utils/ArraysTest.php        |  0
 .../SimpleSAML/Utils/Config}/MetadataTest.php          |  0
 tests/{ => lib/SimpleSAML}/Utils/NetTest.php           |  0
 .../core/{ => lib/Auth/Process}/AttributeAddTest.php   |  0
 tools/phpunit/phpunit.xml                              | 10 ++--------
 6 files changed, 2 insertions(+), 8 deletions(-)
 rename tests/{ => lib/SimpleSAML}/Metadata/SAMLBuilderTest.php (100%)
 rename tests/{ => lib/SimpleSAML}/Utils/ArraysTest.php (100%)
 rename tests/{Metadata => lib/SimpleSAML/Utils/Config}/MetadataTest.php (100%)
 rename tests/{ => lib/SimpleSAML}/Utils/NetTest.php (100%)
 rename tests/modules/core/{ => lib/Auth/Process}/AttributeAddTest.php (100%)

diff --git a/tests/Metadata/SAMLBuilderTest.php b/tests/lib/SimpleSAML/Metadata/SAMLBuilderTest.php
similarity index 100%
rename from tests/Metadata/SAMLBuilderTest.php
rename to tests/lib/SimpleSAML/Metadata/SAMLBuilderTest.php
diff --git a/tests/Utils/ArraysTest.php b/tests/lib/SimpleSAML/Utils/ArraysTest.php
similarity index 100%
rename from tests/Utils/ArraysTest.php
rename to tests/lib/SimpleSAML/Utils/ArraysTest.php
diff --git a/tests/Metadata/MetadataTest.php b/tests/lib/SimpleSAML/Utils/Config/MetadataTest.php
similarity index 100%
rename from tests/Metadata/MetadataTest.php
rename to tests/lib/SimpleSAML/Utils/Config/MetadataTest.php
diff --git a/tests/Utils/NetTest.php b/tests/lib/SimpleSAML/Utils/NetTest.php
similarity index 100%
rename from tests/Utils/NetTest.php
rename to tests/lib/SimpleSAML/Utils/NetTest.php
diff --git a/tests/modules/core/AttributeAddTest.php b/tests/modules/core/lib/Auth/Process/AttributeAddTest.php
similarity index 100%
rename from tests/modules/core/AttributeAddTest.php
rename to tests/modules/core/lib/Auth/Process/AttributeAddTest.php
diff --git a/tools/phpunit/phpunit.xml b/tools/phpunit/phpunit.xml
index 5526f19ee..2a4cb9373 100644
--- a/tools/phpunit/phpunit.xml
+++ b/tools/phpunit/phpunit.xml
@@ -10,14 +10,8 @@
          syntaxCheck="false"
          bootstrap="./../../vendor/autoload.php">
     <testsuites>
-        <testsuite name="Utils">
-            <directory>./../../tests/Utils/</directory>
-        </testsuite>
-        <testsuite name="Metadata">
-            <directory>./../../tests/Metadata/</directory>
-        </testsuite>
-        <testsuite name="modules-core">
-            <directory>./../../tests/modules/core/</directory>
+        <testsuite name="Unit tests">
+            <directory>./../../tests/</directory>
         </testsuite>
     </testsuites>
     <filter>
-- 
GitLab