From aa3d5be589272211698a581915a9f0b22845b1f9 Mon Sep 17 00:00:00 2001 From: Tom Rochette Date: Sun, 12 Jun 2016 13:52:18 -0400 Subject: [PATCH] Move tests to the Fhaculty\Graph\Tests namespace. Update composer.json to use autoload-dev to autoload the new Fhaculty\Graph\Tests namespace. Rename bootstrap.php to TestCase.php and remove the unnecessary include_once. Update phpunit.xml.dist to use vendor/autoload.php instead of tests/bootstrap.php. --- composer.json | 17 +++++++++++++++-- phpunit.xml.dist | 4 ++-- tests/Attribute/AbstractAttributeAwareTest.php | 4 ++++ tests/Attribute/AttributeBagContainerTest.php | 2 ++ tests/Attribute/AttributeBagNamespacedTest.php | 2 ++ tests/Attribute/AttributeBagReferenceTest.php | 2 ++ tests/Edge/EdgeAttributesTest.php | 4 +++- tests/Edge/EdgeBaseTest.php | 4 +++- tests/Edge/EdgeDirectedTest.php | 2 ++ tests/Edge/EdgeUndirectedTest.php | 2 ++ tests/Exception/NegativeCycleExceptionTest.php | 3 +++ tests/GraphTest.php | 3 +++ tests/Set/BaseVerticesTest.php | 3 +++ tests/Set/EdgesTest.php | 3 +++ tests/Set/VerticesMapTest.php | 2 ++ tests/Set/VerticesTest.php | 2 ++ tests/{bootstrap.php => TestCase.php} | 5 +++-- tests/VertexTest.php | 3 +++ tests/WalkTest.php | 2 ++ 19 files changed, 61 insertions(+), 8 deletions(-) rename tests/{bootstrap.php => TestCase.php} (95%) diff --git a/composer.json b/composer.json index 32480a37..eb89e68f 100644 --- a/composer.json +++ b/composer.json @@ -2,11 +2,24 @@ "name": "clue/graph", "type": "library", "description": "A mathematical graph/network library written in PHP", - "keywords": ["graph", "network", "mathematical", "vertex", "edge"], + "keywords": [ + "graph", + "network", + "mathematical", + "vertex", + "edge" + ], "homepage": "https://github.com/clue/graph", "license": "MIT", "autoload": { - "psr-4": {"Fhaculty\\Graph\\": "src/"} + "psr-4": { + "Fhaculty\\Graph\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Fhaculty\\Graph\\Tests\\": "tests/" + } }, "require": { "php": ">=5.3.0" diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 828ef003..8e3bc329 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,6 +1,6 @@ -./src/ - \ No newline at end of file + diff --git a/tests/Attribute/AbstractAttributeAwareTest.php b/tests/Attribute/AbstractAttributeAwareTest.php index 2a2e4dc7..2695756c 100644 --- a/tests/Attribute/AbstractAttributeAwareTest.php +++ b/tests/Attribute/AbstractAttributeAwareTest.php @@ -1,6 +1,10 @@