From b5c58c99cfd94caa92ed66f398b78c683fadbf0f Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Mon, 13 May 2013 19:21:52 +0200 Subject: [PATCH] Review directories structure --- .../Setup/{System => }/Information.php | 2 +- .../{System => }/InformationInterface.php | 2 +- .../Setup/{System => }/PhpIniRequirement.php | 2 +- .../Phrasea/Setup/Probe/ProbeInterface.php | 5 ++++- .../Phrasea/Setup/Probe/SearchEngineProbe.php | 2 +- .../Setup/{System => }/Requirement.php | 2 +- .../{System => }/RequirementCollection.php | 2 +- .../RequirementCollectionInterface.php | 2 +- .../{System => }/RequirementInterface.php | 2 +- .../Requirements/BinariesRequirements.php | 4 ++-- .../Requirements/CacheServerRequirement.php | 4 ++-- .../Requirements/FilesystemRequirements.php | 4 ++-- .../Requirements/LocalesRequirements.php | 4 ++-- .../Requirements/OpcodeCacheRequirement.php | 4 ++-- .../Setup/Requirements/PhpRequirements.php | 4 ++-- .../Requirements/PhraseaRequirements.php | 4 ++-- .../Requirements/RequirementInterface.php | 21 +++++++++++++++++++ .../Setup/Requirements/SystemRequirements.php | 4 ++-- .../Phrasea/Setup/ConfigurationTesterTest.php | 2 +- .../Phrasea/Setup/Probe/ProbeTestCase.php | 6 +++--- .../Requirements/RequirementsTestCase.php | 18 ++++++++-------- 21 files changed, 62 insertions(+), 38 deletions(-) rename lib/Alchemy/Phrasea/Setup/{System => }/Information.php (94%) rename lib/Alchemy/Phrasea/Setup/{System => }/InformationInterface.php (92%) rename lib/Alchemy/Phrasea/Setup/{System => }/PhpIniRequirement.php (98%) rename lib/Alchemy/Phrasea/Setup/{System => }/Requirement.php (98%) rename lib/Alchemy/Phrasea/Setup/{System => }/RequirementCollection.php (99%) rename lib/Alchemy/Phrasea/Setup/{System => }/RequirementCollectionInterface.php (99%) rename lib/Alchemy/Phrasea/Setup/{System => }/RequirementInterface.php (96%) create mode 100644 lib/Alchemy/Phrasea/Setup/Requirements/RequirementInterface.php diff --git a/lib/Alchemy/Phrasea/Setup/System/Information.php b/lib/Alchemy/Phrasea/Setup/Information.php similarity index 94% rename from lib/Alchemy/Phrasea/Setup/System/Information.php rename to lib/Alchemy/Phrasea/Setup/Information.php index cd65e17107..c31acdb31d 100644 --- a/lib/Alchemy/Phrasea/Setup/System/Information.php +++ b/lib/Alchemy/Phrasea/Setup/Information.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Setup\System; +namespace Alchemy\Phrasea\Setup; class Information implements InformationInterface { diff --git a/lib/Alchemy/Phrasea/Setup/System/InformationInterface.php b/lib/Alchemy/Phrasea/Setup/InformationInterface.php similarity index 92% rename from lib/Alchemy/Phrasea/Setup/System/InformationInterface.php rename to lib/Alchemy/Phrasea/Setup/InformationInterface.php index c8c620d5c6..a642df1026 100644 --- a/lib/Alchemy/Phrasea/Setup/System/InformationInterface.php +++ b/lib/Alchemy/Phrasea/Setup/InformationInterface.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Alchemy\Phrasea\Setup\System; +namespace Alchemy\Phrasea\Setup; interface InformationInterface { diff --git a/lib/Alchemy/Phrasea/Setup/System/PhpIniRequirement.php b/lib/Alchemy/Phrasea/Setup/PhpIniRequirement.php similarity index 98% rename from lib/Alchemy/Phrasea/Setup/System/PhpIniRequirement.php rename to lib/Alchemy/Phrasea/Setup/PhpIniRequirement.php index bd193f114b..34dca2833b 100644 --- a/lib/Alchemy/Phrasea/Setup/System/PhpIniRequirement.php +++ b/lib/Alchemy/Phrasea/Setup/PhpIniRequirement.php @@ -1,6 +1,6 @@ getTester()->getRequirements() as $requirements) { - $this->assertInstanceOf('Alchemy\Phrasea\Setup\System\RequirementCollectionInterface', $requirements); + $this->assertInstanceOf('Alchemy\Phrasea\Setup\RequirementCollectionInterface', $requirements); } } diff --git a/tests/Alchemy/Tests/Phrasea/Setup/Probe/ProbeTestCase.php b/tests/Alchemy/Tests/Phrasea/Setup/Probe/ProbeTestCase.php index 5752d7011b..b89a0fee14 100644 --- a/tests/Alchemy/Tests/Phrasea/Setup/Probe/ProbeTestCase.php +++ b/tests/Alchemy/Tests/Phrasea/Setup/Probe/ProbeTestCase.php @@ -23,7 +23,7 @@ abstract class ProbeTestCase extends \PhraseanetPHPUnitAbstract $this->assertInternalType('array', $this->getProbe()->getRecommendations()); foreach ($this->getProbe()->getRecommendations() as $recommandation) { - $this->assertInstanceOf('Alchemy\Phrasea\Setup\System\RequirementInterface', $recommandation); + $this->assertInstanceOf('Alchemy\Phrasea\Setup\RequirementInterface', $recommandation); } } @@ -32,7 +32,7 @@ abstract class ProbeTestCase extends \PhraseanetPHPUnitAbstract $this->assertInternalType('array', $this->getProbe()->getRequirements()); foreach ($this->getProbe()->getRequirements() as $requirement) { - $this->assertInstanceOf('Alchemy\Phrasea\Setup\System\RequirementInterface', $requirement); + $this->assertInstanceOf('Alchemy\Phrasea\Setup\RequirementInterface', $requirement); } } @@ -41,7 +41,7 @@ abstract class ProbeTestCase extends \PhraseanetPHPUnitAbstract $this->assertInternalType('array', $this->getProbe()->getInformations()); foreach ($this->getProbe()->getInformations() as $information) { - $this->assertInstanceOf('Alchemy\Phrasea\Setup\System\InformationInterface', $information); + $this->assertInstanceOf('Alchemy\Phrasea\Setup\InformationInterface', $information); } } } diff --git a/tests/Alchemy/Tests/Phrasea/Setup/Requirements/RequirementsTestCase.php b/tests/Alchemy/Tests/Phrasea/Setup/Requirements/RequirementsTestCase.php index 5f81230ba0..2e6b235efd 100644 --- a/tests/Alchemy/Tests/Phrasea/Setup/Requirements/RequirementsTestCase.php +++ b/tests/Alchemy/Tests/Phrasea/Setup/Requirements/RequirementsTestCase.php @@ -2,8 +2,8 @@ namespace Alchemy\Tests\Phrasea\Setup\Requirements; -use Alchemy\Phrasea\Setup\System\RequirementCollection; -use Alchemy\Phrasea\Setup\System\RequirementCollectionInterface; +use Alchemy\Phrasea\Setup\RequirementCollection; +use Alchemy\Phrasea\Setup\RequirementCollectionInterface; abstract class RequirementsTestCase extends \PHPUnit_Framework_TestCase { @@ -14,13 +14,13 @@ abstract class RequirementsTestCase extends \PHPUnit_Framework_TestCase public function testIsInterface() { - $this->assertInstanceOf('Alchemy\Phrasea\Setup\System\RequirementCollectionInterface', $this->provideRequirements()); + $this->assertInstanceOf('Alchemy\Phrasea\Setup\RequirementCollectionInterface', $this->provideRequirements()); } public function testAdd() { $collection = $this->provideRequirements(); - $requirement = $this->getMock('Alchemy\Phrasea\Setup\System\RequirementInterface'); + $requirement = $this->getMock('Alchemy\Phrasea\Setup\RequirementInterface'); $collection->add($requirement); $found = false; @@ -39,7 +39,7 @@ abstract class RequirementsTestCase extends \PHPUnit_Framework_TestCase { $collection = $this->provideRequirements(); - $requirement = $this->getMock('Alchemy\Phrasea\Setup\System\RequirementInterface'); + $requirement = $this->getMock('Alchemy\Phrasea\Setup\RequirementInterface'); $coll = new RequirementCollection(); $coll->add($requirement); @@ -64,7 +64,7 @@ abstract class RequirementsTestCase extends \PHPUnit_Framework_TestCase $this->assertInternalType('array', $collection->all()); foreach ($collection->all() as $requirement) { - $this->assertInstanceOf('Alchemy\Phrasea\Setup\System\RequirementInterface', $requirement); + $this->assertInstanceOf('Alchemy\Phrasea\Setup\RequirementInterface', $requirement); } } @@ -75,7 +75,7 @@ abstract class RequirementsTestCase extends \PHPUnit_Framework_TestCase $this->assertInternalType('array', $collection->getFailedRecommendations()); foreach ($collection->getFailedRecommendations() as $requirement) { - $this->assertInstanceOf('Alchemy\Phrasea\Setup\System\RequirementInterface', $requirement); + $this->assertInstanceOf('Alchemy\Phrasea\Setup\RequirementInterface', $requirement); } } @@ -86,7 +86,7 @@ abstract class RequirementsTestCase extends \PHPUnit_Framework_TestCase $this->assertInternalType('array', $collection->getFailedRequirements()); foreach ($collection->getFailedRequirements() as $requirement) { - $this->assertInstanceOf('Alchemy\Phrasea\Setup\System\RequirementInterface', $requirement); + $this->assertInstanceOf('Alchemy\Phrasea\Setup\RequirementInterface', $requirement); } } @@ -97,7 +97,7 @@ abstract class RequirementsTestCase extends \PHPUnit_Framework_TestCase $this->assertInternalType('array', $collection->getInformations()); foreach ($collection->getInformations() as $requirement) { - $this->assertInstanceOf('Alchemy\Phrasea\Setup\System\InformationInterface', $requirement); + $this->assertInstanceOf('Alchemy\Phrasea\Setup\InformationInterface', $requirement); } }