mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-15 13:25:30 +01:00
Add failing test case for StringToArrayArgumentProcessRectorTest about Traversable.
This commit is contained in:
parent
946ef1e9c2
commit
6ab3ee9a67
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\Symfony\Tests\Rector\New_\StringToArrayArgumentProcessRector\Fixture;
|
||||
|
||||
final class TraversableClass implements \IteratorAggregate
|
||||
{
|
||||
public function someMethod($arg1, $arg2)
|
||||
{
|
||||
}
|
||||
|
||||
public function getIterator()
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\Symfony\Tests\Rector\New_\StringToArrayArgumentProcessRector\Fixture;
|
||||
|
||||
class TestClass
|
||||
{
|
||||
public function foo(): void
|
||||
{
|
||||
(new TraversableClass())->someMethod('some string that should remain a string', ['test_key' => 'test value']);
|
||||
}
|
||||
}
|
@ -24,6 +24,7 @@ final class StringToArrayArgumentProcessRectorTest extends AbstractRectorTestCas
|
||||
yield [__DIR__ . '/Fixture/fixture4.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/with_sprintf.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/skip_anonymous_class.php.inc'];
|
||||
yield [__DIR__ . '/Fixture/skip_class_extending_traversable.php.inc'];
|
||||
}
|
||||
|
||||
protected function getRectorClass(): string
|
||||
|
Loading…
x
Reference in New Issue
Block a user