Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
zidar-bot committed Jun 7, 2021
1 parent 4c7de56 commit 713b532
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 72 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"php": "^7.4",
"ext-json": "*",
"symfony/http-client-contracts": "^2.3",
"symfony/serializer": "^5.2"
"symfony/serializer": "^5.2",
"doctrine/annotations": "^1.13",
"symfony/property-info": "^5.3",
"symfony/property-access": "^5.3"
},
"autoload": {
"psr-4": {
Expand All @@ -28,9 +31,6 @@
"require-dev": {
"phpunit/phpunit": "^9.5",
"symfony/http-client": "^5.3",
"doctrine/annotations": "^1.13",
"symfony/property-info": "^5.3",
"symfony/property-access": "^5.3",
"symfony/var-dumper": "^5.3"
}
}
30 changes: 0 additions & 30 deletions tests/Helper.php

This file was deleted.

15 changes: 0 additions & 15 deletions tests/NotNullJsonEncode.php

This file was deleted.

14 changes: 0 additions & 14 deletions tests/NotNullJsonEncoder.php

This file was deleted.

12 changes: 3 additions & 9 deletions tests/ZohoAuthServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@

namespace Tests;

use DateTimeZone;
use Doctrine\Common\Annotations\AnnotationReader;
use Nebkam\ZohoOAuth\ZohoOAuthService;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpClient\NativeHttpClient;
use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor;
use Symfony\Component\Serializer\Encoder\JsonEncoder;
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter;
use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer;
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
use Symfony\Component\Serializer\Serializer;
use Symfony\Component\Serializer\SerializerInterface;
Expand All @@ -29,14 +27,10 @@ private static function createSerializer(): SerializerInterface
null,
new PhpDocExtractor()
);
$dateTimeNormalizer = new DateTimeNormalizer([
DateTimeNormalizer::FORMAT_KEY => 'd.m.Y. H:i',
DateTimeNormalizer::TIMEZONE_KEY => new DateTimeZone('Europe/Belgrade')
]);

return new Serializer(
[$dateTimeNormalizer, $objectNormalizer, new ArrayDenormalizer()],
[new NotNullJsonEncoder()]
[$objectNormalizer],
[new JsonEncoder()]
);
}

Expand Down

0 comments on commit 713b532

Please sign in to comment.