From 5ebde806461c94bc52a0ce04d59e5bb0e28ead91 Mon Sep 17 00:00:00 2001 From: Meritoo Date: Mon, 4 Mar 2019 19:35:42 +0100 Subject: [PATCH] Tests > use "Meritoo\Test\Common" namespace (instead of "Meritoo\Common\Test") --- CHANGELOG.md | 1 + composer.json | 2 +- tests/Collection/CollectionTest.php | 2 +- .../Base/UnknownTypeExceptionTest.php | 2 +- .../IncorrectBundleNameExceptionTest.php | 2 +- .../Date/UnknownDatePartTypeExceptionTest.php | 2 +- .../Exception/File/EmptyFileExceptionTest.php | 2 +- .../File/EmptyFilePathExceptionTest.php | 2 +- .../File/NotExistingFileExceptionTest.php | 2 +- .../Method/DisabledMethodExceptionTest.php | 2 +- .../CannotResolveClassNameExceptionTest.php | 2 +- .../MissingChildClassesExceptionTest.php | 2 +- .../NotExistingPropertyExceptionTest.php | 2 +- .../TooManyChildClassesExceptionTest.php | 2 +- .../IncorrectColorHexLengthExceptionTest.php | 2 +- .../InvalidColorHexValueExceptionTest.php | 2 +- .../InvalidHtmlAttributesExceptionTest.php | 2 +- .../Regex/InvalidUrlExceptionTest.php | 2 +- .../UnknownOopVisibilityTypeExceptionTest.php | 2 +- tests/Test/Base/BaseTestCaseTest.php | 2 +- tests/Type/Base/BaseTypeTest.php | 2 +- tests/Type/DatePartTypeTest.php | 48 +++++++-------- tests/Type/DatePeriodTest.php | 58 +++++++++---------- tests/Utilities/Arrays/SimpleToString.php | 2 +- tests/Utilities/ArraysTest.php | 4 +- tests/Utilities/Bootstrap4CssSelectorTest.php | 2 +- tests/Utilities/BundleTest.php | 2 +- tests/Utilities/ComposerTest.php | 2 +- tests/Utilities/CssSelectorTest.php | 2 +- tests/Utilities/DateTest.php | 9 ++- tests/Utilities/GeneratorUtilityTest.php | 2 +- tests/Utilities/LocaleTest.php | 6 +- tests/Utilities/MimeTypesTest.php | 2 +- tests/Utilities/MiscellaneousTest.php | 2 +- tests/Utilities/QueryBuilderUtilityTest.php | 5 +- tests/Utilities/Reflection/A.php | 2 +- tests/Utilities/Reflection/B.php | 2 +- tests/Utilities/Reflection/C.php | 2 +- tests/Utilities/Reflection/D.php | 2 +- tests/Utilities/Reflection/E.php | 2 +- tests/Utilities/Reflection/F.php | 2 +- tests/Utilities/Reflection/G.php | 2 +- tests/Utilities/Reflection/H.php | 2 +- tests/Utilities/Reflection/I.php | 2 +- tests/Utilities/ReflectionTest.php | 22 +++---- tests/Utilities/Repository/Sortable.php | 2 +- tests/Utilities/RepositoryTest.php | 16 +++-- tests/Utilities/UriTest.php | 2 +- tests/Utilities/XmlTest.php | 2 +- tests/ValueObject/AddressTest.php | 2 +- tests/ValueObject/BankAccountTest.php | 2 +- tests/ValueObject/CompanyTest.php | 2 +- tests/ValueObject/HumanTest.php | 2 +- tests/ValueObject/VersionTest.php | 2 +- 54 files changed, 134 insertions(+), 125 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba62097..9306157 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Common and useful classes, methods, exceptions etc. 1. Arrays > refactoring & more tests 2. ValueObject > Human > represents a human +3. Tests > use `Meritoo\Test\Common` namespace (instead of `Meritoo\Common\Test`) # 0.1.5 diff --git a/composer.json b/composer.json index 1206a5a..bf18bd2 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ }, "autoload-dev": { "psr-4": { - "Meritoo\\Common\\Test\\": "tests/" + "Meritoo\\Test\\Common\\": "tests/" } }, "config": { diff --git a/tests/Collection/CollectionTest.php b/tests/Collection/CollectionTest.php index b2df4aa..5b789c7 100644 --- a/tests/Collection/CollectionTest.php +++ b/tests/Collection/CollectionTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Collection; +namespace Meritoo\Test\Common\Collection; use ArrayIterator; use Generator; diff --git a/tests/Exception/Base/UnknownTypeExceptionTest.php b/tests/Exception/Base/UnknownTypeExceptionTest.php index c453db6..ce910d3 100644 --- a/tests/Exception/Base/UnknownTypeExceptionTest.php +++ b/tests/Exception/Base/UnknownTypeExceptionTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Exception\Base; +namespace Meritoo\Test\Common\Exception\Base; use Meritoo\Common\Exception\Base\UnknownTypeException; use Meritoo\Common\Test\Base\BaseTestCase; diff --git a/tests/Exception/Bundle/IncorrectBundleNameExceptionTest.php b/tests/Exception/Bundle/IncorrectBundleNameExceptionTest.php index 3899331..5c2d420 100644 --- a/tests/Exception/Bundle/IncorrectBundleNameExceptionTest.php +++ b/tests/Exception/Bundle/IncorrectBundleNameExceptionTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Exception\Bundle; +namespace Meritoo\Test\Common\Exception\Bundle; use Meritoo\Common\Exception\Bundle\IncorrectBundleNameException; use Meritoo\Common\Test\Base\BaseTestCase; diff --git a/tests/Exception/Date/UnknownDatePartTypeExceptionTest.php b/tests/Exception/Date/UnknownDatePartTypeExceptionTest.php index d60bd4c..f694ef1 100644 --- a/tests/Exception/Date/UnknownDatePartTypeExceptionTest.php +++ b/tests/Exception/Date/UnknownDatePartTypeExceptionTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Exception\Date; +namespace Meritoo\Test\Common\Exception\Date; use Generator; use Meritoo\Common\Exception\Type\UnknownDatePartTypeException; diff --git a/tests/Exception/File/EmptyFileExceptionTest.php b/tests/Exception/File/EmptyFileExceptionTest.php index 531e0b0..a2ee08d 100644 --- a/tests/Exception/File/EmptyFileExceptionTest.php +++ b/tests/Exception/File/EmptyFileExceptionTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Exception\File; +namespace Meritoo\Test\Common\Exception\File; use Generator; use Meritoo\Common\Exception\File\EmptyFileException; diff --git a/tests/Exception/File/EmptyFilePathExceptionTest.php b/tests/Exception/File/EmptyFilePathExceptionTest.php index 35d24d9..b582579 100644 --- a/tests/Exception/File/EmptyFilePathExceptionTest.php +++ b/tests/Exception/File/EmptyFilePathExceptionTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Exception\File; +namespace Meritoo\Test\Common\Exception\File; use Meritoo\Common\Exception\File\EmptyFilePathException; use Meritoo\Common\Test\Base\BaseTestCase; diff --git a/tests/Exception/File/NotExistingFileExceptionTest.php b/tests/Exception/File/NotExistingFileExceptionTest.php index f0b0dd5..08f8868 100644 --- a/tests/Exception/File/NotExistingFileExceptionTest.php +++ b/tests/Exception/File/NotExistingFileExceptionTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Exception\File; +namespace Meritoo\Test\Common\Exception\File; use Generator; use Meritoo\Common\Exception\File\NotExistingFileException; diff --git a/tests/Exception/Method/DisabledMethodExceptionTest.php b/tests/Exception/Method/DisabledMethodExceptionTest.php index b2b33cd..a815b4e 100644 --- a/tests/Exception/Method/DisabledMethodExceptionTest.php +++ b/tests/Exception/Method/DisabledMethodExceptionTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Exception\Method; +namespace Meritoo\Test\Common\Exception\Method; use Generator; use Meritoo\Common\Exception\Method\DisabledMethodException; diff --git a/tests/Exception/Reflection/CannotResolveClassNameExceptionTest.php b/tests/Exception/Reflection/CannotResolveClassNameExceptionTest.php index b165e12..c6f9082 100644 --- a/tests/Exception/Reflection/CannotResolveClassNameExceptionTest.php +++ b/tests/Exception/Reflection/CannotResolveClassNameExceptionTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Exception\Reflection; +namespace Meritoo\Test\Common\Exception\Reflection; use Generator; use Meritoo\Common\Exception\Reflection\CannotResolveClassNameException; diff --git a/tests/Exception/Reflection/MissingChildClassesExceptionTest.php b/tests/Exception/Reflection/MissingChildClassesExceptionTest.php index 3771d8b..900d6e2 100644 --- a/tests/Exception/Reflection/MissingChildClassesExceptionTest.php +++ b/tests/Exception/Reflection/MissingChildClassesExceptionTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Exception\Reflection; +namespace Meritoo\Test\Common\Exception\Reflection; use Generator; use Meritoo\Common\Exception\Reflection\MissingChildClassesException; diff --git a/tests/Exception/Reflection/NotExistingPropertyExceptionTest.php b/tests/Exception/Reflection/NotExistingPropertyExceptionTest.php index 502a248..e172003 100644 --- a/tests/Exception/Reflection/NotExistingPropertyExceptionTest.php +++ b/tests/Exception/Reflection/NotExistingPropertyExceptionTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Exception\Reflection; +namespace Meritoo\Test\Common\Exception\Reflection; use Meritoo\Common\Exception\Reflection\NotExistingPropertyException; use Meritoo\Common\Test\Base\BaseTestCase; diff --git a/tests/Exception/Reflection/TooManyChildClassesExceptionTest.php b/tests/Exception/Reflection/TooManyChildClassesExceptionTest.php index 49cab93..3c19cad 100644 --- a/tests/Exception/Reflection/TooManyChildClassesExceptionTest.php +++ b/tests/Exception/Reflection/TooManyChildClassesExceptionTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Exception\Reflection; +namespace Meritoo\Test\Common\Exception\Reflection; use Generator; use Meritoo\Common\Exception\Reflection\TooManyChildClassesException; diff --git a/tests/Exception/Regex/IncorrectColorHexLengthExceptionTest.php b/tests/Exception/Regex/IncorrectColorHexLengthExceptionTest.php index 9abef1b..9482dbd 100644 --- a/tests/Exception/Regex/IncorrectColorHexLengthExceptionTest.php +++ b/tests/Exception/Regex/IncorrectColorHexLengthExceptionTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Exception\Regex; +namespace Meritoo\Test\Common\Exception\Regex; use Generator; use Meritoo\Common\Exception\Regex\IncorrectColorHexLengthException; diff --git a/tests/Exception/Regex/InvalidColorHexValueExceptionTest.php b/tests/Exception/Regex/InvalidColorHexValueExceptionTest.php index 87ce62d..ec32268 100644 --- a/tests/Exception/Regex/InvalidColorHexValueExceptionTest.php +++ b/tests/Exception/Regex/InvalidColorHexValueExceptionTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Exception\Regex; +namespace Meritoo\Test\Common\Exception\Regex; use Generator; use Meritoo\Common\Exception\Regex\InvalidColorHexValueException; diff --git a/tests/Exception/Regex/InvalidHtmlAttributesExceptionTest.php b/tests/Exception/Regex/InvalidHtmlAttributesExceptionTest.php index 8319283..6772791 100644 --- a/tests/Exception/Regex/InvalidHtmlAttributesExceptionTest.php +++ b/tests/Exception/Regex/InvalidHtmlAttributesExceptionTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Exception\Regex; +namespace Meritoo\Test\Common\Exception\Regex; use Generator; use Meritoo\Common\Exception\Regex\InvalidHtmlAttributesException; diff --git a/tests/Exception/Regex/InvalidUrlExceptionTest.php b/tests/Exception/Regex/InvalidUrlExceptionTest.php index 16bc8f5..0e36d77 100644 --- a/tests/Exception/Regex/InvalidUrlExceptionTest.php +++ b/tests/Exception/Regex/InvalidUrlExceptionTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Exception\Regex; +namespace Meritoo\Test\Common\Exception\Regex; use Generator; use Meritoo\Common\Exception\Regex\InvalidUrlException; diff --git a/tests/Exception/Type/UnknownOopVisibilityTypeExceptionTest.php b/tests/Exception/Type/UnknownOopVisibilityTypeExceptionTest.php index df508e2..3f8377b 100644 --- a/tests/Exception/Type/UnknownOopVisibilityTypeExceptionTest.php +++ b/tests/Exception/Type/UnknownOopVisibilityTypeExceptionTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Exception\Type; +namespace Meritoo\Test\Common\Exception\Type; use Generator; use Meritoo\Common\Exception\Type\UnknownOopVisibilityTypeException; diff --git a/tests/Test/Base/BaseTestCaseTest.php b/tests/Test/Base/BaseTestCaseTest.php index 1136686..71dc496 100644 --- a/tests/Test/Base/BaseTestCaseTest.php +++ b/tests/Test/Base/BaseTestCaseTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Test\Base; +namespace Meritoo\Test\Common\Test\Base; use DateTime; use Generator; diff --git a/tests/Type/Base/BaseTypeTest.php b/tests/Type/Base/BaseTypeTest.php index 1b9b962..f21a1dc 100644 --- a/tests/Type/Base/BaseTypeTest.php +++ b/tests/Type/Base/BaseTypeTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Type\Base; +namespace Meritoo\Test\Common\Type\Base; use Generator; use Meritoo\Common\Test\Base\BaseTestCase; diff --git a/tests/Type/DatePartTypeTest.php b/tests/Type/DatePartTypeTest.php index 541aa15..782c259 100644 --- a/tests/Type/DatePartTypeTest.php +++ b/tests/Type/DatePartTypeTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Type; +namespace Meritoo\Test\Common\Type; use Meritoo\Common\Test\Base\BaseTypeTestCase; use Meritoo\Common\Type\DatePartType; @@ -19,29 +19,6 @@ use Meritoo\Common\Type\DatePartType; */ class DatePartTypeTest extends BaseTypeTestCase { - /** - * {@inheritdoc} - */ - protected function getAllExpectedTypes() - { - return [ - 'DAY' => DatePartType::DAY, - 'HOUR' => DatePartType::HOUR, - 'MINUTE' => DatePartType::MINUTE, - 'MONTH' => DatePartType::MONTH, - 'SECOND' => DatePartType::SECOND, - 'YEAR' => DatePartType::YEAR, - ]; - } - - /** - * {@inheritdoc} - */ - protected function getTestedTypeInstance() - { - return new DatePartType(); - } - /** * {@inheritdoc} */ @@ -97,4 +74,27 @@ class DatePartTypeTest extends BaseTypeTestCase true, ]; } + + /** + * {@inheritdoc} + */ + protected function getAllExpectedTypes() + { + return [ + 'DAY' => DatePartType::DAY, + 'HOUR' => DatePartType::HOUR, + 'MINUTE' => DatePartType::MINUTE, + 'MONTH' => DatePartType::MONTH, + 'SECOND' => DatePartType::SECOND, + 'YEAR' => DatePartType::YEAR, + ]; + } + + /** + * {@inheritdoc} + */ + protected function getTestedTypeInstance() + { + return new DatePartType(); + } } diff --git a/tests/Type/DatePeriodTest.php b/tests/Type/DatePeriodTest.php index fc6557f..a73ceaf 100644 --- a/tests/Type/DatePeriodTest.php +++ b/tests/Type/DatePeriodTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Type; +namespace Meritoo\Test\Common\Type; use DateTime; use Generator; @@ -214,34 +214,6 @@ class DatePeriodTest extends BaseTypeTestCase ]; } - /** - * Returns all expected types of the tested type - * - * @return array - */ - protected function getAllExpectedTypes() - { - return [ - 'LAST_MONTH' => DatePeriod::LAST_MONTH, - 'LAST_WEEK' => DatePeriod::LAST_WEEK, - 'LAST_YEAR' => DatePeriod::LAST_YEAR, - 'NEXT_MONTH' => DatePeriod::NEXT_MONTH, - 'NEXT_WEEK' => DatePeriod::NEXT_WEEK, - 'NEXT_YEAR' => DatePeriod::NEXT_YEAR, - 'THIS_MONTH' => DatePeriod::THIS_MONTH, - 'THIS_WEEK' => DatePeriod::THIS_WEEK, - 'THIS_YEAR' => DatePeriod::THIS_YEAR, - ]; - } - - /** - * {@inheritdoc} - */ - protected function getTestedTypeInstance() - { - return new DatePeriod(); - } - /** * {@inheritdoc} */ @@ -277,4 +249,32 @@ class DatePeriodTest extends BaseTypeTestCase true, ]; } + + /** + * Returns all expected types of the tested type + * + * @return array + */ + protected function getAllExpectedTypes() + { + return [ + 'LAST_MONTH' => DatePeriod::LAST_MONTH, + 'LAST_WEEK' => DatePeriod::LAST_WEEK, + 'LAST_YEAR' => DatePeriod::LAST_YEAR, + 'NEXT_MONTH' => DatePeriod::NEXT_MONTH, + 'NEXT_WEEK' => DatePeriod::NEXT_WEEK, + 'NEXT_YEAR' => DatePeriod::NEXT_YEAR, + 'THIS_MONTH' => DatePeriod::THIS_MONTH, + 'THIS_WEEK' => DatePeriod::THIS_WEEK, + 'THIS_YEAR' => DatePeriod::THIS_YEAR, + ]; + } + + /** + * {@inheritdoc} + */ + protected function getTestedTypeInstance() + { + return new DatePeriod(); + } } diff --git a/tests/Utilities/Arrays/SimpleToString.php b/tests/Utilities/Arrays/SimpleToString.php index 16ec4d0..dd51827 100644 --- a/tests/Utilities/Arrays/SimpleToString.php +++ b/tests/Utilities/Arrays/SimpleToString.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities\Arrays; +namespace Meritoo\Test\Common\Utilities\Arrays; /** * Simple class convertible to string. diff --git a/tests/Utilities/ArraysTest.php b/tests/Utilities/ArraysTest.php index 3c1aa6d..168fac7 100644 --- a/tests/Utilities/ArraysTest.php +++ b/tests/Utilities/ArraysTest.php @@ -6,11 +6,11 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities; +namespace Meritoo\Test\Common\Utilities; use Meritoo\Common\Test\Base\BaseTestCase; -use Meritoo\Common\Test\Utilities\Arrays\SimpleToString; use Meritoo\Common\Utilities\Arrays; +use Meritoo\Test\Common\Utilities\Arrays\SimpleToString; /** * Test case of the useful arrays methods diff --git a/tests/Utilities/Bootstrap4CssSelectorTest.php b/tests/Utilities/Bootstrap4CssSelectorTest.php index c2aa462..ee6787d 100644 --- a/tests/Utilities/Bootstrap4CssSelectorTest.php +++ b/tests/Utilities/Bootstrap4CssSelectorTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities; +namespace Meritoo\Test\Common\Utilities; use Meritoo\Common\Test\Base\BaseTestCase; use Meritoo\Common\Utilities\Bootstrap4CssSelector; diff --git a/tests/Utilities/BundleTest.php b/tests/Utilities/BundleTest.php index a8fe474..92dd655 100644 --- a/tests/Utilities/BundleTest.php +++ b/tests/Utilities/BundleTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities; +namespace Meritoo\Test\Common\Utilities; use Generator; use Meritoo\Common\Exception\Bundle\IncorrectBundleNameException; diff --git a/tests/Utilities/ComposerTest.php b/tests/Utilities/ComposerTest.php index b526c5e..10e4177 100644 --- a/tests/Utilities/ComposerTest.php +++ b/tests/Utilities/ComposerTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities; +namespace Meritoo\Test\Common\Utilities; use Generator; use Meritoo\Common\Test\Base\BaseTestCase; diff --git a/tests/Utilities/CssSelectorTest.php b/tests/Utilities/CssSelectorTest.php index f85fa53..0ab9535 100644 --- a/tests/Utilities/CssSelectorTest.php +++ b/tests/Utilities/CssSelectorTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities; +namespace Meritoo\Test\Common\Utilities; use Meritoo\Common\Test\Base\BaseTestCase; use Meritoo\Common\Utilities\CssSelector; diff --git a/tests/Utilities/DateTest.php b/tests/Utilities/DateTest.php index 94a7813..5fca3fe 100644 --- a/tests/Utilities/DateTest.php +++ b/tests/Utilities/DateTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities; +namespace Meritoo\Test\Common\Utilities; use DateInterval; use DateTime; @@ -680,7 +680,8 @@ class DateTest extends BaseTestCase } /** - * @param int $period The period, type of period. One of DatePeriod class constants, e.g. DatePeriod::LAST_WEEK. + * @param int $period The period, type of period. One of DatePeriod class constants, e.g. + * DatePeriod::LAST_WEEK. * @param DatePeriod $expected Expected start and end date for given period * * @dataProvider provideCorrectPeriod @@ -982,7 +983,9 @@ class DateTest extends BaseTestCase DatePeriod::NEXT_WEEK, new DatePeriod( (new DateTime('this week'))->add(new DateInterval('P7D'))->setTime(0, 0, 0), - (new DateTime('this week'))->add(new DateInterval('P7D'))->add(new DateInterval('P6D'))->setTime(23, 59, 59) + (new DateTime('this week'))->add(new DateInterval('P7D')) + ->add(new DateInterval('P6D')) + ->setTime(23, 59, 59) ), ]; diff --git a/tests/Utilities/GeneratorUtilityTest.php b/tests/Utilities/GeneratorUtilityTest.php index 27cf5d7..7642c87 100644 --- a/tests/Utilities/GeneratorUtilityTest.php +++ b/tests/Utilities/GeneratorUtilityTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities; +namespace Meritoo\Test\Common\Utilities; use Meritoo\Common\Test\Base\BaseTestCase; use Meritoo\Common\Utilities\GeneratorUtility; diff --git a/tests/Utilities/LocaleTest.php b/tests/Utilities/LocaleTest.php index 5ad4d90..6a2c9ea 100644 --- a/tests/Utilities/LocaleTest.php +++ b/tests/Utilities/LocaleTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities; +namespace Meritoo\Test\Common\Utilities; use Generator; use Meritoo\Common\Test\Base\BaseTestCase; @@ -80,8 +80,8 @@ class LocaleTest extends BaseTestCase } /** - * @param int $category Named constant specifying the category of the functions affected by the locale setting. - * It's the same constant as required by setlocale() function. + * @param int $category Named constant specifying the category of the functions affected by the locale + * setting. It's the same constant as required by setlocale() function. * @param string $languageCode Language code, in ISO 639-1 format. Short form of the locale, e.g. "fr". * @param string $countryCode Country code, in ISO 3166-1 alpha-2 format, e.g. "FR" * @param string $expectedLocale Expected locale diff --git a/tests/Utilities/MimeTypesTest.php b/tests/Utilities/MimeTypesTest.php index b51e7f2..ee0e85e 100644 --- a/tests/Utilities/MimeTypesTest.php +++ b/tests/Utilities/MimeTypesTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities; +namespace Meritoo\Test\Common\Utilities; use Generator; use Meritoo\Common\Test\Base\BaseTestCase; diff --git a/tests/Utilities/MiscellaneousTest.php b/tests/Utilities/MiscellaneousTest.php index c5cfed2..38aec86 100644 --- a/tests/Utilities/MiscellaneousTest.php +++ b/tests/Utilities/MiscellaneousTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities; +namespace Meritoo\Test\Common\Utilities; use Generator; use Meritoo\Common\Exception\Regex\IncorrectColorHexLengthException; diff --git a/tests/Utilities/QueryBuilderUtilityTest.php b/tests/Utilities/QueryBuilderUtilityTest.php index ece2b21..0451ef8 100644 --- a/tests/Utilities/QueryBuilderUtilityTest.php +++ b/tests/Utilities/QueryBuilderUtilityTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities; +namespace Meritoo\Test\Common\Utilities; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\EntityManager; @@ -260,7 +260,8 @@ class QueryBuilderUtilityTest extends BaseTestCase $entityManager ->expects(static::any()) ->method('getExpressionBuilder') - ->willReturn(new Expr()); + ->willReturn(new Expr()) + ; yield[ (new QueryBuilder($entityManager))->from('lorem_ipsum', 'lm'), diff --git a/tests/Utilities/Reflection/A.php b/tests/Utilities/Reflection/A.php index d3c5e0c..f20ca1a 100644 --- a/tests/Utilities/Reflection/A.php +++ b/tests/Utilities/Reflection/A.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities\Reflection; +namespace Meritoo\Test\Common\Utilities\Reflection; /** * The A class. diff --git a/tests/Utilities/Reflection/B.php b/tests/Utilities/Reflection/B.php index 0ada1d0..101cdce 100644 --- a/tests/Utilities/Reflection/B.php +++ b/tests/Utilities/Reflection/B.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities\Reflection; +namespace Meritoo\Test\Common\Utilities\Reflection; /** * The B class. diff --git a/tests/Utilities/Reflection/C.php b/tests/Utilities/Reflection/C.php index 8807a35..3c4d598 100644 --- a/tests/Utilities/Reflection/C.php +++ b/tests/Utilities/Reflection/C.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities\Reflection; +namespace Meritoo\Test\Common\Utilities\Reflection; /** * The C class. diff --git a/tests/Utilities/Reflection/D.php b/tests/Utilities/Reflection/D.php index d031a08..06f6550 100644 --- a/tests/Utilities/Reflection/D.php +++ b/tests/Utilities/Reflection/D.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities\Reflection; +namespace Meritoo\Test\Common\Utilities\Reflection; /** * The D class. diff --git a/tests/Utilities/Reflection/E.php b/tests/Utilities/Reflection/E.php index 177e94d..7a72efc 100644 --- a/tests/Utilities/Reflection/E.php +++ b/tests/Utilities/Reflection/E.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities\Reflection; +namespace Meritoo\Test\Common\Utilities\Reflection; /** * The E trait. diff --git a/tests/Utilities/Reflection/F.php b/tests/Utilities/Reflection/F.php index f563db7..7206544 100644 --- a/tests/Utilities/Reflection/F.php +++ b/tests/Utilities/Reflection/F.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities\Reflection; +namespace Meritoo\Test\Common\Utilities\Reflection; /** * The F class. diff --git a/tests/Utilities/Reflection/G.php b/tests/Utilities/Reflection/G.php index 0fb8ff6..d7f2c54 100644 --- a/tests/Utilities/Reflection/G.php +++ b/tests/Utilities/Reflection/G.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities\Reflection; +namespace Meritoo\Test\Common\Utilities\Reflection; /** * The G class. diff --git a/tests/Utilities/Reflection/H.php b/tests/Utilities/Reflection/H.php index 68fa525..a5ce14d 100644 --- a/tests/Utilities/Reflection/H.php +++ b/tests/Utilities/Reflection/H.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities\Reflection; +namespace Meritoo\Test\Common\Utilities\Reflection; /** * The H class. diff --git a/tests/Utilities/Reflection/I.php b/tests/Utilities/Reflection/I.php index d6a2063..020b149 100644 --- a/tests/Utilities/Reflection/I.php +++ b/tests/Utilities/Reflection/I.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities\Reflection; +namespace Meritoo\Test\Common\Utilities\Reflection; /** * The H interface. diff --git a/tests/Utilities/ReflectionTest.php b/tests/Utilities/ReflectionTest.php index f4c5261..2507d7e 100644 --- a/tests/Utilities/ReflectionTest.php +++ b/tests/Utilities/ReflectionTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities; +namespace Meritoo\Test\Common\Utilities; use DateTime; use Generator; @@ -16,16 +16,16 @@ use Meritoo\Common\Exception\Reflection\MissingChildClassesException; use Meritoo\Common\Exception\Reflection\NotExistingPropertyException; use Meritoo\Common\Exception\Reflection\TooManyChildClassesException; use Meritoo\Common\Test\Base\BaseTestCase; -use Meritoo\Common\Test\Utilities\Reflection\A; -use Meritoo\Common\Test\Utilities\Reflection\B; -use Meritoo\Common\Test\Utilities\Reflection\C; -use Meritoo\Common\Test\Utilities\Reflection\D; -use Meritoo\Common\Test\Utilities\Reflection\E; -use Meritoo\Common\Test\Utilities\Reflection\F; -use Meritoo\Common\Test\Utilities\Reflection\G; -use Meritoo\Common\Test\Utilities\Reflection\H; -use Meritoo\Common\Test\Utilities\Reflection\I; use Meritoo\Common\Utilities\Reflection; +use Meritoo\Test\Common\Utilities\Reflection\A; +use Meritoo\Test\Common\Utilities\Reflection\B; +use Meritoo\Test\Common\Utilities\Reflection\C; +use Meritoo\Test\Common\Utilities\Reflection\D; +use Meritoo\Test\Common\Utilities\Reflection\E; +use Meritoo\Test\Common\Utilities\Reflection\F; +use Meritoo\Test\Common\Utilities\Reflection\G; +use Meritoo\Test\Common\Utilities\Reflection\H; +use Meritoo\Test\Common\Utilities\Reflection\I; use ReflectionProperty; /** @@ -107,7 +107,7 @@ class ReflectionTest extends BaseTestCase /* * Existing class */ - self::assertEquals('Meritoo\Common\Test\Utilities', Reflection::getClassNamespace(self::class)); + self::assertEquals('Meritoo\Test\Common\Utilities', Reflection::getClassNamespace(self::class)); self::assertEquals(DateTime::class, Reflection::getClassNamespace(new DateTime())); self::assertEquals(DateTime::class, Reflection::getClassNamespace([ diff --git a/tests/Utilities/Repository/Sortable.php b/tests/Utilities/Repository/Sortable.php index c4b0413..fc877b6 100644 --- a/tests/Utilities/Repository/Sortable.php +++ b/tests/Utilities/Repository/Sortable.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities\Repository; +namespace Meritoo\Test\Common\Utilities\Repository; /** * Sortable object/entity. diff --git a/tests/Utilities/RepositoryTest.php b/tests/Utilities/RepositoryTest.php index 97a7b2b..72d58a7 100644 --- a/tests/Utilities/RepositoryTest.php +++ b/tests/Utilities/RepositoryTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities; +namespace Meritoo\Test\Common\Utilities; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; @@ -14,8 +14,8 @@ use Doctrine\ORM\Query\Expr\OrderBy; use Doctrine\ORM\QueryBuilder; use Generator; use Meritoo\Common\Test\Base\BaseTestCase; -use Meritoo\Common\Test\Utilities\Repository\Sortable; use Meritoo\Common\Utilities\Repository; +use Meritoo\Test\Common\Utilities\Repository\Sortable; use stdClass; /** @@ -220,7 +220,8 @@ class RepositoryTest extends BaseTestCase ->setMethods([ 'createQueryBuilder', ]) - ->getMock(); + ->getMock() + ; $expectedQueryBuilder = new QueryBuilder($entityManager); $expectedQueryBuilder->from('any_table_name', 'qb'); @@ -228,7 +229,8 @@ class RepositoryTest extends BaseTestCase $entityRepository ->expects(static::once()) ->method('createQueryBuilder') - ->willReturn($expectedQueryBuilder); + ->willReturn($expectedQueryBuilder) + ; $queryBuilder = Repository::getEntityOrderedQueryBuilder($entityRepository); $selectDQLPart = $queryBuilder->getDQLPart('select'); @@ -262,7 +264,8 @@ class RepositoryTest extends BaseTestCase ->setMethods([ 'createQueryBuilder', ]) - ->getMock(); + ->getMock() + ; $expectedQueryBuilder = new QueryBuilder($entityManager); $expectedQueryBuilder->from('any_table_name', 'qb'); @@ -270,7 +273,8 @@ class RepositoryTest extends BaseTestCase $entityRepository ->expects(static::once()) ->method('createQueryBuilder') - ->willReturn($expectedQueryBuilder); + ->willReturn($expectedQueryBuilder) + ; $queryBuilder = Repository::getEntityOrderedQueryBuilder($entityRepository, $property, $direction); $selectDQLPart = $queryBuilder->getDQLPart('select'); diff --git a/tests/Utilities/UriTest.php b/tests/Utilities/UriTest.php index e341d65..20b1eaf 100644 --- a/tests/Utilities/UriTest.php +++ b/tests/Utilities/UriTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities; +namespace Meritoo\Test\Common\Utilities; use Generator; use Meritoo\Common\Test\Base\BaseTestCase; diff --git a/tests/Utilities/XmlTest.php b/tests/Utilities/XmlTest.php index 804d77a..494aabf 100644 --- a/tests/Utilities/XmlTest.php +++ b/tests/Utilities/XmlTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\Utilities; +namespace Meritoo\Test\Common\Utilities; use Meritoo\Common\Test\Base\BaseTestCase; use Meritoo\Common\Utilities\Xml; diff --git a/tests/ValueObject/AddressTest.php b/tests/ValueObject/AddressTest.php index e07db25..5cd1899 100644 --- a/tests/ValueObject/AddressTest.php +++ b/tests/ValueObject/AddressTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\ValueObject; +namespace Meritoo\Test\Common\ValueObject; use Meritoo\Common\Test\Base\BaseTestCase; use Meritoo\Common\Type\OopVisibilityType; diff --git a/tests/ValueObject/BankAccountTest.php b/tests/ValueObject/BankAccountTest.php index 9dc6ab4..ac38dbc 100644 --- a/tests/ValueObject/BankAccountTest.php +++ b/tests/ValueObject/BankAccountTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\ValueObject; +namespace Meritoo\Test\Common\ValueObject; use Meritoo\Common\Test\Base\BaseTestCase; use Meritoo\Common\Type\OopVisibilityType; diff --git a/tests/ValueObject/CompanyTest.php b/tests/ValueObject/CompanyTest.php index d6da00b..383b012 100644 --- a/tests/ValueObject/CompanyTest.php +++ b/tests/ValueObject/CompanyTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\ValueObject; +namespace Meritoo\Test\Common\ValueObject; use Meritoo\Common\Test\Base\BaseTestCase; use Meritoo\Common\Type\OopVisibilityType; diff --git a/tests/ValueObject/HumanTest.php b/tests/ValueObject/HumanTest.php index 0480b80..1a58e35 100644 --- a/tests/ValueObject/HumanTest.php +++ b/tests/ValueObject/HumanTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\ValueObject; +namespace Meritoo\Test\Common\ValueObject; use Meritoo\Common\Test\Base\BaseTestCase; use Meritoo\Common\Type\OopVisibilityType; diff --git a/tests/ValueObject/VersionTest.php b/tests/ValueObject/VersionTest.php index 7876798..fb0e783 100644 --- a/tests/ValueObject/VersionTest.php +++ b/tests/ValueObject/VersionTest.php @@ -6,7 +6,7 @@ * file that was distributed with this source code. */ -namespace Meritoo\Common\Test\ValueObject; +namespace Meritoo\Test\Common\ValueObject; use Generator; use Meritoo\Common\Test\Base\BaseTestCase;