Skip to content

Commit

Permalink
test: Reorganize test namespaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
priyadi committed Jan 15, 2024
1 parent f57a94e commit 3411ad2
Show file tree
Hide file tree
Showing 21 changed files with 30 additions and 28 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 0.5.12

* test: Reorganize test namespaces.

## 0.5.11

* feat: Make the fourth argument optional in `TryPropertyCommand`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Rekalogika\Mapper\Tests\Fixtures\ArrayLikeDto;

use Rekalogika\Mapper\Tests\Fixtures\Scalar\ObjectWithScalarPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\ScalarDto\ObjectWithScalarPropertiesDto;

class ObjectWithArrayAccessPropertyDto
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/ArrayLikeDto/ObjectWithArrayPropertyDto.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Rekalogika\Mapper\Tests\Fixtures\ArrayLikeDto;

use Rekalogika\Mapper\Tests\Fixtures\Scalar\ObjectWithScalarPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\ScalarDto\ObjectWithScalarPropertiesDto;

class ObjectWithArrayPropertyDto
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Rekalogika\Mapper\Tests\Fixtures\ArrayLikeDto;

use Rekalogika\Mapper\Tests\Fixtures\Scalar\ObjectWithScalarPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\ScalarDto\ObjectWithScalarPropertiesDto;

class ObjectWithArrayPropertyDtoWithIntKey
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace Rekalogika\Mapper\Tests\Fixtures\ArrayLikeDto;

use Doctrine\Common\Collections\Collection;
use Rekalogika\Mapper\Tests\Fixtures\Scalar\ObjectWithScalarPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\ScalarDto\ObjectWithScalarPropertiesDto;

class ObjectWithCollectionPropertyDto
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Rekalogika\Mapper\Tests\Fixtures\ArrayLikeDto;

use Rekalogika\Mapper\Tests\Fixtures\Scalar\ObjectWithScalarPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\ScalarDto\ObjectWithScalarPropertiesDto;

class ObjectWithTraversablePropertyDto
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/MethodMapper/ObjectWithArrayPropertyDto.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use Rekalogika\Mapper\Context\Context;
use Rekalogika\Mapper\MethodMapper\MapFromObjectInterface;
use Rekalogika\Mapper\MethodMapper\SubMapperInterface;
use Rekalogika\Mapper\Tests\Fixtures\Scalar\ObjectWithScalarPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\ScalarDto\ObjectWithScalarPropertiesDto;

final class ObjectWithArrayPropertyDto implements MapFromObjectInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Rekalogika\Mapper\MethodMapper\MapToObjectInterface;
use Rekalogika\Mapper\MethodMapper\SubMapperInterface;
use Rekalogika\Mapper\Tests\Fixtures\Scalar\ObjectWithScalarProperties;
use Rekalogika\Mapper\Tests\Fixtures\Scalar\ObjectWithScalarPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\ScalarDto\ObjectWithScalarPropertiesDto;

final class ObjectWithObjectWithScalarPropertiesDto implements
MapFromObjectInterface,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
* that was distributed with this source code.
*/

namespace Rekalogika\Mapper\Tests\Fixtures\Transformer;
namespace Rekalogika\Mapper\Tests\Fixtures\Money;

use Brick\Money\Money;
use Rekalogika\Mapper\Context\Context;
use Rekalogika\Mapper\Exception\InvalidArgumentException;
use Rekalogika\Mapper\Tests\Fixtures\Money\MoneyDto;
use Rekalogika\Mapper\Transformer\Contracts\TransformerInterface;
use Rekalogika\Mapper\Transformer\Contracts\TypeMapping;
use Rekalogika\Mapper\Util\TypeCheck;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* that was distributed with this source code.
*/

namespace Rekalogika\Mapper\Tests\Fixtures\Scalar;
namespace Rekalogika\Mapper\Tests\Fixtures\ScalarDto;

class ObjectWithBoolPropertiesDto
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* that was distributed with this source code.
*/

namespace Rekalogika\Mapper\Tests\Fixtures\Scalar;
namespace Rekalogika\Mapper\Tests\Fixtures\ScalarDto;

class ObjectWithFloatPropertiesDto
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* that was distributed with this source code.
*/

namespace Rekalogika\Mapper\Tests\Fixtures\Scalar;
namespace Rekalogika\Mapper\Tests\Fixtures\ScalarDto;

class ObjectWithIntPropertiesDto
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* that was distributed with this source code.
*/

namespace Rekalogika\Mapper\Tests\Fixtures\Scalar;
namespace Rekalogika\Mapper\Tests\Fixtures\ScalarDto;

class ObjectWithScalarPropertiesDto
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* that was distributed with this source code.
*/

namespace Rekalogika\Mapper\Tests\Fixtures\Scalar;
namespace Rekalogika\Mapper\Tests\Fixtures\ScalarDto;

class ObjectWithStringPropertiesDto
{
Expand Down
2 changes: 1 addition & 1 deletion tests/IntegrationTest/ArrayAndObjectMappingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace Rekalogika\Mapper\Tests\IntegrationTest;

use Rekalogika\Mapper\Tests\Common\AbstractIntegrationTest;
use Rekalogika\Mapper\Tests\Fixtures\Scalar\ObjectWithScalarPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\ScalarDto\ObjectWithScalarPropertiesDto;

class ArrayAndObjectMappingTest extends AbstractIntegrationTest
{
Expand Down
2 changes: 1 addition & 1 deletion tests/IntegrationTest/CustomTransformerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use Brick\Money\Money;
use Rekalogika\Mapper\Tests\Common\AbstractIntegrationTest;
use Rekalogika\Mapper\Tests\Fixtures\Money\MoneyDto;
use Rekalogika\Mapper\Tests\Fixtures\Transformer\MoneyToMoneyDtoTransformer;
use Rekalogika\Mapper\Tests\Fixtures\Money\MoneyToMoneyDtoTransformer;

class CustomTransformerTest extends AbstractIntegrationTest
{
Expand Down
6 changes: 3 additions & 3 deletions tests/IntegrationTest/MappingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

namespace Rekalogika\Mapper\Tests\IntegrationTest;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Rekalogika\Mapper\Attribute\InheritanceMap;
use Rekalogika\Mapper\Tests\Common\AbstractIntegrationTest;
use Rekalogika\Mapper\Tests\Fixtures\EnumAndStringable\ObjectImplementingStringable;
Expand All @@ -25,12 +27,10 @@
use Rekalogika\Mapper\Transformer\ObjectToStringTransformer;
use Rekalogika\Mapper\Transformer\ScalarToScalarTransformer;
use Rekalogika\Mapper\Transformer\StringToBackedEnumTransformer;
use Rekalogika\Mapper\Transformer\TraversableToArrayAccessTransformer;
use Rekalogika\Mapper\Util\TypeFactory;
use Symfony\Component\Clock\DatePoint;
use Symfony\Component\PropertyInfo\Type;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Rekalogika\Mapper\Transformer\TraversableToArrayAccessTransformer;

class MappingTest extends AbstractIntegrationTest
{
Expand Down
2 changes: 1 addition & 1 deletion tests/IntegrationTest/MethodMapperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use Rekalogika\Mapper\Tests\Fixtures\MethodMapper\ObjectWithCollectionProperty;
use Rekalogika\Mapper\Tests\Fixtures\MethodMapper\ObjectWithObjectWithScalarProperties;
use Rekalogika\Mapper\Tests\Fixtures\MethodMapper\ObjectWithObjectWithScalarPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\Scalar\ObjectWithScalarPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\ScalarDto\ObjectWithScalarPropertiesDto;

class MethodMapperTest extends AbstractIntegrationTest
{
Expand Down
10 changes: 5 additions & 5 deletions tests/IntegrationTest/ScalarPropertiesMappingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
namespace Rekalogika\Mapper\Tests\IntegrationTest;

use Rekalogika\Mapper\Tests\Common\AbstractIntegrationTest;
use Rekalogika\Mapper\Tests\Fixtures\Scalar\ObjectWithBoolPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\Scalar\ObjectWithFloatPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\Scalar\ObjectWithIntPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\Scalar\ObjectWithScalarProperties;
use Rekalogika\Mapper\Tests\Fixtures\Scalar\ObjectWithScalarPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\Scalar\ObjectWithStringPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\ScalarDto\ObjectWithBoolPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\ScalarDto\ObjectWithFloatPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\ScalarDto\ObjectWithIntPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\ScalarDto\ObjectWithScalarPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\ScalarDto\ObjectWithStringPropertiesDto;

class ScalarPropertiesMappingTest extends AbstractIntegrationTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

namespace Rekalogika\Mapper\Tests\IntegrationTest;

use ArrayObject;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Rekalogika\Mapper\Tests\Common\AbstractIntegrationTest;
Expand All @@ -26,7 +25,7 @@
use Rekalogika\Mapper\Tests\Fixtures\ArrayLikeDto\ObjectWithArrayPropertyWithoutTypeHintDto;
use Rekalogika\Mapper\Tests\Fixtures\ArrayLikeDto\ObjectWithCollectionPropertyDto;
use Rekalogika\Mapper\Tests\Fixtures\Scalar\ObjectWithScalarProperties;
use Rekalogika\Mapper\Tests\Fixtures\Scalar\ObjectWithScalarPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\ScalarDto\ObjectWithScalarPropertiesDto;

class TraversableToArrayAccessMappingTest extends AbstractIntegrationTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use Rekalogika\Mapper\Tests\Fixtures\ArrayLike\ObjectWithLazyDoctrineCollectionWithPresetCountableProperty;
use Rekalogika\Mapper\Tests\Fixtures\ArrayLike\ObjectWithTraversableProperties;
use Rekalogika\Mapper\Tests\Fixtures\ArrayLikeDto\ObjectWithTraversablePropertyDto;
use Rekalogika\Mapper\Tests\Fixtures\Scalar\ObjectWithScalarPropertiesDto;
use Rekalogika\Mapper\Tests\Fixtures\ScalarDto\ObjectWithScalarPropertiesDto;
use Rekalogika\Mapper\Transformer\Model\TraversableCountableWrapper;

class TraversableToTraversableMappingTest extends AbstractIntegrationTest
Expand Down

0 comments on commit 3411ad2

Please sign in to comment.