|
@@ 96-106 (lines=11) @@
|
| 93 |
|
* @test |
| 94 |
|
* @dataProvider dataproviderForShouldCreateArgumentFromString |
| 95 |
|
*/ |
| 96 |
|
public function shouldCreateArgumentFromString($expectedResult, string $source, bool $shouldReject) |
| 97 |
|
{ |
| 98 |
|
if ($shouldReject) { |
| 99 |
|
$this->expectException(InvalidArgumentException::class); |
| 100 |
|
} |
| 101 |
|
|
| 102 |
|
/** @var object $actualResult */ |
| 103 |
|
$actualResult = $this->factory->createArgumentFromString($source); |
| 104 |
|
|
| 105 |
|
$this->assertEquals($expectedResult, $actualResult); |
| 106 |
|
} |
| 107 |
|
|
| 108 |
|
public function dataproviderForShouldCreateArgumentFromString(): array |
| 109 |
|
{ |
|
@@ 127-137 (lines=11) @@
|
| 124 |
|
* @test |
| 125 |
|
* @dataProvider dataproviderForShouldCreateArgumentFromArray |
| 126 |
|
*/ |
| 127 |
|
public function shouldCreateArgumentFromArray($expectedResult, array $source, bool $shouldReject) |
| 128 |
|
{ |
| 129 |
|
if ($shouldReject) { |
| 130 |
|
$this->expectException(InvalidArgumentException::class); |
| 131 |
|
} |
| 132 |
|
|
| 133 |
|
/** @var object $actualResult */ |
| 134 |
|
$actualResult = $this->factory->createArgumentFromArray($source); |
| 135 |
|
|
| 136 |
|
$this->assertEquals($expectedResult, $actualResult); |
| 137 |
|
} |
| 138 |
|
|
| 139 |
|
public function dataproviderForShouldCreateArgumentFromArray(): array |
| 140 |
|
{ |