1111use Rector \BetterPhpDocParser \PhpDocInfo \PhpDocInfo ;
1212use Rector \BetterPhpDocParser \PhpDocInfo \PhpDocInfoFactory ;
1313use Rector \BetterPhpDocParser \Printer \PhpDocInfoPrinter ;
14- use Rector \NodeTypeResolver \PhpDoc \NodeAnalyzer \DocBlockTagReplacer ;
1514use Rector \NodeTypeResolver \Reflection \BetterReflection \SourceLocatorProvider \DynamicSourceLocatorProvider ;
1615use Rector \StaticTypeMapper \ValueObject \Type \NonExistingObjectType ;
1716use Rector \Testing \PHPUnit \AbstractLazyTestCase ;
@@ -22,8 +21,6 @@ final class PhpDocInfoTest extends AbstractLazyTestCase
2221
2322 private PhpDocInfoPrinter $ phpDocInfoPrinter ;
2423
25- private DocBlockTagReplacer $ docBlockTagReplacer ;
26-
2724 protected function setUp (): void
2825 {
2926 parent ::setUp ();
@@ -33,7 +30,6 @@ protected function setUp(): void
3330 $ dynamicSourceLocatorProvider ->reset ();
3431
3532 $ this ->phpDocInfoPrinter = $ this ->make (PhpDocInfoPrinter::class);
36- $ this ->docBlockTagReplacer = $ this ->make (DocBlockTagReplacer::class);
3733
3834 $ phpDocInfo = $ this ->createPhpDocInfoFromFile (__DIR__ . '/Source/doc.txt ' );
3935 $ this ->assertInstanceOf (PhpDocInfo::class, $ phpDocInfo );
@@ -59,21 +55,6 @@ public function testGetReturnType(): void
5955 $ this ->assertEquals ($ nonExistingObjectType , $ this ->phpDocInfo ->getReturnType ());
6056 }
6157
62- public function testReplaceTagByAnother (): void
63- {
64- $ phpDocInfo = $ this ->createPhpDocInfoFromFile (__DIR__ . '/Source/test-tag.txt ' );
65- $ this ->assertInstanceOf (PhpDocInfo::class, $ phpDocInfo );
66-
67- $ this ->docBlockTagReplacer ->replaceTagByAnother ($ phpDocInfo , 'test ' , 'flow ' );
68-
69- $ printedPhpDocInfo = $ this ->phpDocInfoPrinter ->printFormatPreserving ($ phpDocInfo );
70- $ printedPhpDocInfo = str_replace ("\r\n" , "\n" , $ printedPhpDocInfo );
71-
72- $ fileContent = str_replace ("\r\n" , "\n" , FileSystem ::read (__DIR__ . '/Source/expected-replaced-tag.txt ' ));
73-
74- $ this ->assertSame ($ fileContent , $ printedPhpDocInfo );
75- }
76-
7758 public function testDoNotAddSpaseWhenAddEmptyString (): void
7859 {
7960 $ this ->phpDocInfo ->addPhpDocTagNode (new PhpDocTextNode ('' ));
0 commit comments