Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
liquetsoft committed Sep 11, 2024
1 parent 79d7636 commit 6ae3b6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/Command/UpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ public function handle(): void
);
}
$newVersion = $state->getParameterString(StateParameter::FIAS_NEXT_VERSION_NUMBER);
$this->info("Updated to version '{$newVersion}'");
if ($newVersion !== '') {
$this->info("Updated to version '{$newVersion}'");
}
} while ($newVersion !== '');

$total = round(microtime(true) - $start, 4);
Expand Down
9 changes: 5 additions & 4 deletions tests/Serializer/FiasSerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Illuminate\Support\Carbon;
use Liquetsoft\Fias\Laravel\LiquetsoftFiasBundle\Serializer\FiasSerializer;
use Liquetsoft\Fias\Laravel\LiquetsoftFiasBundle\Serializer\CompiledEntitesDenormalizer;
use Liquetsoft\Fias\Laravel\LiquetsoftFiasBundle\Tests\BaseCase;
use Liquetsoft\Fias\Laravel\LiquetsoftFiasBundle\Tests\MockModel\FiasSerializerMock;
use Symfony\Component\Serializer\Exception\InvalidArgumentException;
Expand Down Expand Up @@ -94,10 +95,10 @@ public function testDenormalizeConvertException(): void
$data = '<ActualStatus testDateVal="test"/>';
$type = FiasSerializerMock::class;

$normalizer = new FiasSerializer();
$normalizer = new CompiledEntitesDenormalizer();

$this->expectException(NotNormalizableValueException::class);
$normalizer->deserialize($data, $type, 'xml');
$normalizer->denormalize($data, $type, 'xml');
}

/**
Expand All @@ -108,10 +109,10 @@ public function testDenormalizeWrongObjectToPopulate(): void
$data = '<ActualStatus defaultItem="test"/>';
$type = FiasSerializerMock::class;

$normalizer = new FiasSerializer();
$normalizer = new CompiledEntitesDenormalizer();

$this->expectException(InvalidArgumentException::class);
$normalizer->deserialize($data, $type, 'xml', [
$normalizer->denormalize($data, $type, 'xml', [
'object_to_populate' => new \stdClass(),
]);
}
Expand Down

0 comments on commit 6ae3b6b

Please sign in to comment.