File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ protected function setUp()
88 {
99 parent ::setUp ();
1010
11- $ this -> givenSourceFile ( ' KindsExample.php ' , <<<'EOS'
11+ $ sourceCode = <<<'EOS'
1212<?php
1313namespace KindsExampleNamespace;
1414class KindsExampleClass
@@ -42,12 +42,17 @@ function kindsExampleFunction()
4242interface KindsExampleInterface
4343{
4444}
45+ EOS;
4546
47+ if (version_compare ('5.4.0 ' , PHP_VERSION , '<= ' )) {
48+ $ sourceCode .= <<<EOS
4649trait KindsExampleTrait
4750{
4851}
49- EOS
50- );
52+ EOS ;
53+ }
54+
55+ $ this ->givenSourceFile ('KindsExample.php ' , $ sourceCode );
5156 }
5257
5358 /**
@@ -243,6 +248,10 @@ public function itSupportsInterfaceKindsParameter()
243248 */
244249 public function itSupportsTraitKindsParameter ()
245250 {
251+ if (version_compare ('5.4.0 ' , PHP_VERSION , '> ' )) {
252+ $ this ->markTestSkipped ('Traits were not introduced until 5.4 ' );
253+ }
254+
246255 $ this ->runPHPCtagsWithKinds ('t ' );
247256
248257 $ this ->assertTagsFileHeaderIsCorrect ();
@@ -251,7 +260,7 @@ public function itSupportsTraitKindsParameter()
251260 'KindsExample.php ' ,
252261 'KindsExampleTrait ' ,
253262 self ::KIND_TRAIT ,
254- 35 ,
263+ 33 ,
255264 'namespace:KindsExampleNamespace '
256265 );
257266 }
You can’t perform that action at this time.
0 commit comments