@@ -34,7 +34,7 @@ public function testGetCommandLineData()
3434 {
3535 // Use the default values which are different across PHPCS versions. 
3636 $ expected  = 'utf-8 ' ;
37-  if  (\version_compare (Helper:: getVersion () , '2.99.99 ' , '<= ' ) === true ) {
37+  if  (\version_compare (static :: $ phpcsVersion  , '2.99.99 ' , '<= ' ) === true ) {
3838 // Will effectively come down to `iso-8859-1`. 
3939 $ expected  = null ;
4040 }
@@ -68,7 +68,7 @@ public function testGetTabWidth()
6868 $ result  = Helper::getTabWidth (self ::$ phpcsFile );
6969 $ this  ->assertSame (4 , $ result , 'Failed retrieving the default tab width ' );
7070
71-  if  (\version_compare (Helper:: getVersion () , '2.99.99 ' , '> ' ) === true ) {
71+  if  (\version_compare (static :: $ phpcsVersion  , '2.99.99 ' , '> ' ) === true ) {
7272 // PHPCS 3.x. 
7373 self ::$ phpcsFile ->config ->tabWidth  = 2 ;
7474 } else  {
@@ -80,7 +80,7 @@ public function testGetTabWidth()
8080 $ this  ->assertSame (2 , $ result , 'Failed retrieving the custom set tab width ' );
8181
8282 // Restore defaults before moving to the next test. 
83-  if  (\version_compare (Helper:: getVersion () , '2.99.99 ' , '> ' ) === true ) {
83+  if  (\version_compare (static :: $ phpcsVersion  , '2.99.99 ' , '> ' ) === true ) {
8484 self ::$ phpcsFile ->config ->restoreDefaults ();
8585 } else  {
8686 self ::$ phpcsFile ->phpcs ->cli ->setCommandLineValues (['--tab-width=4 ' ]);
@@ -96,7 +96,7 @@ public function testGetTabWidth()
9696 */ 
9797 public  function  testIgnoreAnnotationsV2 ()
9898 {
99-  if  (\version_compare (Helper:: getVersion () , '2.99.99 ' , '> ' ) === true ) {
99+  if  (\version_compare (static :: $ phpcsVersion  , '2.99.99 ' , '> ' ) === true ) {
100100 $ this  ->markTestSkipped ('Test only applicable to PHPCS 2.x ' );
101101 }
102102
@@ -112,7 +112,7 @@ public function testIgnoreAnnotationsV2()
112112 */ 
113113 public  function  testIgnoreAnnotationsV3Default ()
114114 {
115-  if  (\version_compare (Helper:: getVersion () , '2.99.99 ' , '<= ' ) === true ) {
115+  if  (\version_compare (static :: $ phpcsVersion  , '2.99.99 ' , '<= ' ) === true ) {
116116 $ this  ->markTestSkipped ('Test only applicable to PHPCS 3.x ' );
117117 }
118118
@@ -135,7 +135,7 @@ public function testIgnoreAnnotationsV3Default()
135135 */ 
136136 public  function  testIgnoreAnnotationsV3SetViaMethod ()
137137 {
138-  if  (\version_compare (Helper:: getVersion () , '2.99.99 ' , '<= ' ) === true ) {
138+  if  (\version_compare (static :: $ phpcsVersion  , '2.99.99 ' , '<= ' ) === true ) {
139139 $ this  ->markTestSkipped ('Test only applicable to PHPCS 3.x ' );
140140 }
141141
@@ -157,7 +157,7 @@ public function testIgnoreAnnotationsV3SetViaMethod()
157157 */ 
158158 public  function  testIgnoreAnnotationsV3SetViaProperty ()
159159 {
160-  if  (\version_compare (Helper:: getVersion () , '2.99.99 ' , '<= ' ) === true ) {
160+  if  (\version_compare (static :: $ phpcsVersion  , '2.99.99 ' , '<= ' ) === true ) {
161161 $ this  ->markTestSkipped ('Test only applicable to PHPCS 3.x ' );
162162 }
163163
0 commit comments