mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
Tests > use "Meritoo\Test\Common" namespace (instead of "Meritoo\Common\Test")
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
),
|
||||
];
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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([
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user