File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
test/unit/SourceLocator/SourceStubber Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -558,6 +558,28 @@ public function testStubForConstantDeclaredByDefine(): void
558558 self ::assertStringEndsWith ("; \n" , $ stub ->getStub ());
559559 }
560560
561+ public function testStubForConstantDeclaredByDefineThatIsDeprecated (): void
562+ {
563+ $ stubData = $ this ->sourceStubber ->generateConstantStub ('E_STRICT ' );
564+
565+ self ::assertStringContainsString (
566+ "define('E_STRICT', 2048); " ,
567+ $ stubData ->getStub (),
568+ );
569+
570+ if (PHP_VERSION_ID >= 80400 ) {
571+ self ::assertStringContainsString (
572+ '@deprecated 8.4 ' ,
573+ $ stubData ->getStub (),
574+ );
575+ } else {
576+ self ::assertStringNotContainsString (
577+ '@deprecated 8.4 ' ,
578+ $ stubData ->getStub (),
579+ );
580+ }
581+ }
582+
561583 public function testStubForConstantDeclaredByConst (): void
562584 {
563585 $ stub = $ this ->sourceStubber ->generateConstantStub ('ast\AST_ARG_LIST ' );
You can’t perform that action at this time.
0 commit comments