-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#68 add nullsafe to Configuration and nullSafety to PropertyMappingPo…
…pulator add test for dot operator add debug functionality to php docker container for testing
- Loading branch information
Showing
9 changed files
with
141 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
tests/Converter/GenericExtendedConverterIntegrationTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Converter; | ||
|
||
use Neusta\ConverterBundle\Converter; | ||
use Neusta\ConverterBundle\Converter\Context\GenericContext; | ||
use Neusta\ConverterBundle\Tests\Fixtures\Model\Person; | ||
use Neusta\ConverterBundle\Tests\Fixtures\Model\User; | ||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | ||
|
||
class GenericExtendedConverterIntegrationTest extends KernelTestCase | ||
{ | ||
/** @var Converter<User, Person, GenericContext> */ | ||
private Converter $converter; | ||
|
||
protected function setUp(): void | ||
{ | ||
parent::setUp(); | ||
$this->converter = self::getContainer()->get('test.person.converter.extended'); | ||
} | ||
|
||
public function testConvert_with_null_safety_property(): void | ||
{ | ||
// Test Fixture | ||
$source = (new User()) | ||
->setFullName(null) | ||
->setAgeInYears(null); | ||
|
||
// Test Execution | ||
$target = $this->converter->convert($source); | ||
|
||
// Test Assertion | ||
self::assertEquals('Hans Herrmann', $target->getFullName()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters