mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-19 06:18:07 +01:00
add dump() case as well
This commit is contained in:
parent
9aa4915838
commit
c4c0b094af
@ -36,3 +36,17 @@ services:
|
||||
position: 1
|
||||
before: 'false'
|
||||
after: 0
|
||||
|
||||
-
|
||||
class: 'Symfony\Component\Yaml\Yaml'
|
||||
method: 'dump'
|
||||
position: 3
|
||||
before: ['false', 'true']
|
||||
after: 'Symfony\Component\Yaml\Yaml::DUMP_OBJECT'
|
||||
|
||||
-
|
||||
class: 'Symfony\Component\Yaml\Yaml'
|
||||
method: 'dump'
|
||||
position: 3
|
||||
before: 'true'
|
||||
after: 'Symfony\Component\Yaml\Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE'
|
||||
|
@ -24,6 +24,7 @@ final class ArgumentDefaultValueReplacerRectorTest extends AbstractRectorTestCas
|
||||
yield [__DIR__ . '/Wrong/wrong2.php.inc', __DIR__ . '/Correct/correct2.php.inc'];
|
||||
yield [__DIR__ . '/Wrong/wrong3.php.inc', __DIR__ . '/Correct/correct3.php.inc'];
|
||||
yield [__DIR__ . '/Wrong/wrong4.php.inc', __DIR__ . '/Correct/correct4.php.inc'];
|
||||
yield [__DIR__ . '/Wrong/wrong5.php.inc', __DIR__ . '/Correct/correct5.php.inc'];
|
||||
}
|
||||
|
||||
protected function provideConfig(): string
|
||||
|
@ -0,0 +1,7 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
|
||||
Yaml::dump(array('foo' => new A(), 'bar' => 1), 0, 0, \Symfony\Component\Yaml\Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE);
|
||||
|
||||
Yaml::dump(array('foo' => new A(), 'bar' => 1), 0, 0, \Symfony\Component\Yaml\Yaml::DUMP_OBJECT);
|
@ -0,0 +1,7 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
|
||||
Yaml::dump(array('foo' => new A(), 'bar' => 1), 0, 0, true);
|
||||
|
||||
Yaml::dump(array('foo' => new A(), 'bar' => 1), 0, 0, false, true);
|
@ -35,3 +35,17 @@ services:
|
||||
position: 1
|
||||
before: 'true'
|
||||
after: 'Symfony\Component\Yaml\Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE'
|
||||
|
||||
-
|
||||
class: 'Symfony\Component\Yaml\Yaml'
|
||||
method: 'dump'
|
||||
position: 3
|
||||
before: ['false', 'true']
|
||||
after: 'Symfony\Component\Yaml\Yaml::DUMP_OBJECT'
|
||||
|
||||
-
|
||||
class: 'Symfony\Component\Yaml\Yaml'
|
||||
method: 'dump'
|
||||
position: 3
|
||||
before: 'true'
|
||||
after: 'Symfony\Component\Yaml\Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE'
|
||||
|
Loading…
x
Reference in New Issue
Block a user