@@ -20,102 +20,102 @@ class VersionParserTest extends \PHPUnit_Framework_TestCase
2020
2121 public function testShouldSelectNothingFromUnstablesIfStableRequested ()
2222 {
23- $ versions = [ '1.0.0a ' , '1.0.0alpha ' , '1.0.0-dev ' , 'dev-1.0.0 ' , '1.0.0b ' ,
24- '1.0.0beta ' , '1.0.0rc ' , '1.0.0RC ' ] ;
23+ $ versions = array ( '1.0.0a ' , '1.0.0alpha ' , '1.0.0-dev ' , 'dev-1.0.0 ' , '1.0.0b ' ,
24+ '1.0.0beta ' , '1.0.0rc ' , '1.0.0RC ' ) ;
2525 $ parser = new VersionParser ($ versions );
2626 $ this ->assertSame (false , $ parser ->getMostRecentStable ());
2727 }
28-
28+
2929 public function testShouldSelectMostRecentVersionFromStandardSelection ()
3030 {
31- $ versions = [ '1.0.0 ' , '1.0.1 ' , '1.1.0 ' ] ;
31+ $ versions = array ( '1.0.0 ' , '1.0.1 ' , '1.1.0 ' ) ;
3232 $ parser = new VersionParser ($ versions );
3333 $ this ->assertSame ('1.1.0 ' , $ parser ->getMostRecentStable ());
3434 }
3535
3636 public function testShouldSelectMostRecentVersionFromMixedSelection ()
3737 {
38- $ versions = [ '1.0.0 ' , '1.0.1 ' , '1.1.0 ' , '1.2.0a ' , '1.2.0b ' , '1.1.0rc ' ] ;
38+ $ versions = array ( '1.0.0 ' , '1.0.1 ' , '1.1.0 ' , '1.2.0a ' , '1.2.0b ' , '1.1.0rc ' ) ;
3939 $ parser = new VersionParser ($ versions );
4040 $ this ->assertSame ('1.1.0 ' , $ parser ->getMostRecentStable ());
4141 }
4242
4343 public function testShouldSelectMostRecentVersionFromPrefixedSelection ()
4444 {
45- $ versions = [ 'v1.0.0 ' , 'v1.0.1 ' , 'v1.1.0 ' ] ;
45+ $ versions = array ( 'v1.0.0 ' , 'v1.0.1 ' , 'v1.1.0 ' ) ;
4646 $ parser = new VersionParser ($ versions );
4747 $ this ->assertSame ('v1.1.0 ' , $ parser ->getMostRecentStable ());
4848 }
4949
5050 public function testShouldSelectMostRecentVersionFromPartlyPrefixedSelection ()
5151 {
52- $ versions = [ 'v1.0.0 ' , 'v1.0.1 ' , '1.1.0 ' ] ;
52+ $ versions = array ( 'v1.0.0 ' , 'v1.0.1 ' , '1.1.0 ' ) ;
5353 $ parser = new VersionParser ($ versions );
5454 $ this ->assertSame ('1.1.0 ' , $ parser ->getMostRecentStable ());
5555 }
5656
5757 public function testShouldSelectMostRecentVersionFromPatchLevels ()
5858 {
59- $ versions = [ '1.0.0 ' , '1.0.0-pl2 ' , '1.0.0-pl3 ' , '1.0.0-pl1 ' ] ;
59+ $ versions = array ( '1.0.0 ' , '1.0.0-pl2 ' , '1.0.0-pl3 ' , '1.0.0-pl1 ' ) ;
6060 $ parser = new VersionParser ($ versions );
6161 $ this ->assertSame ('1.0.0-pl3 ' , $ parser ->getMostRecentStable ());
6262 }
6363
6464 public function testShouldSelectMostRecentVersionFromPatchLevels2 ()
6565 {
66- $ versions = [ '1.0.0 ' , '1.0.0pl2 ' , '1.0.0pl3 ' , '1.0.0pl1 ' ] ;
66+ $ versions = array ( '1.0.0 ' , '1.0.0pl2 ' , '1.0.0pl3 ' , '1.0.0pl1 ' ) ;
6767 $ parser = new VersionParser ($ versions );
6868 $ this ->assertSame ('1.0.0pl3 ' , $ parser ->getMostRecentStable ());
6969 }
7070
7171 // Unstable
72-
72+
7373 public function testShouldSelectNothingFromUnstablesIfUnstableRequested ()
7474 {
75- $ versions = [ '1.0.0 ' , '1.0.1 ' , '1.1.0 ' ] ;
75+ $ versions = array ( '1.0.0 ' , '1.0.1 ' , '1.1.0 ' ) ;
7676 $ parser = new VersionParser ($ versions );
7777 $ this ->assertSame (false , $ parser ->getMostRecentUnstable ());
7878 }
7979
8080 public function testShouldSelectNothingFromStablesOrDevsIfUnstableRequested ()
8181 {
82- $ versions = [ '1.0.0 ' , '1.0.1 ' , '1.1.0-dev ' , 'dev-1.1.1 ' ] ;
82+ $ versions = array ( '1.0.0 ' , '1.0.1 ' , '1.1.0-dev ' , 'dev-1.1.1 ' ) ;
8383 $ parser = new VersionParser ($ versions );
8484 $ this ->assertSame (false , $ parser ->getMostRecentUnstable ());
8585 }
8686
8787 public function testShouldSelectMostRecentUnstableVersionFromStandardSelection ()
8888 {
89- $ versions = [ '1.0.0a ' , '1.0.0alpha ' , '1.0.0-dev ' , 'dev-1.0.0 ' , '1.0.0b ' ,
90- '1.0.0beta ' , '1.0.0rc ' , '1.0.0RC ' ] ;
89+ $ versions = array ( '1.0.0a ' , '1.0.0alpha ' , '1.0.0-dev ' , 'dev-1.0.0 ' , '1.0.0b ' ,
90+ '1.0.0beta ' , '1.0.0rc ' , '1.0.0RC ' ) ;
9191 $ parser = new VersionParser ($ versions );
9292 $ this ->assertSame ('1.0.0rc ' , $ parser ->getMostRecentUnstable ());
9393 }
9494
9595 public function testShouldSelectMostRecentUnstableVersionFromMixedSelection ()
9696 {
97- $ versions = [ '1.0.0 ' , '1.0.1 ' , '1.1.0 ' , '1.2.0a ' , '1.2.0b ' , '1.1.0rc ' ] ;
97+ $ versions = array ( '1.0.0 ' , '1.0.1 ' , '1.1.0 ' , '1.2.0a ' , '1.2.0b ' , '1.1.0rc ' ) ;
9898 $ parser = new VersionParser ($ versions );
9999 $ this ->assertSame ('1.2.0b ' , $ parser ->getMostRecentUnstable ());
100100 }
101101
102102 public function testShouldSelectMostRecentUnstableVersionFromPrefixedSelection ()
103103 {
104- $ versions = [ 'v1.0.0b ' , 'v1.0.1 ' , 'v1.1.0 ' ] ;
104+ $ versions = array ( 'v1.0.0b ' , 'v1.0.1 ' , 'v1.1.0 ' ) ;
105105 $ parser = new VersionParser ($ versions );
106106 $ this ->assertSame ('v1.0.0b ' , $ parser ->getMostRecentUnstable ());
107107 }
108108
109109 public function testShouldSelectMostRecentUnstableVersionFromPartlyPrefixedSelection ()
110110 {
111- $ versions = [ 'v1.0.0b ' , 'v1.0.0a ' , '1.1.0a ' ] ;
111+ $ versions = array ( 'v1.0.0b ' , 'v1.0.0a ' , '1.1.0a ' ) ;
112112 $ parser = new VersionParser ($ versions );
113113 $ this ->assertSame ('1.1.0a ' , $ parser ->getMostRecentUnstable ());
114114 }
115115
116116 public function testShouldSelectMostRecentUnstableFromVaryingNumeralCounts ()
117117 {
118- $ versions = [ '1.0-dev ' , '1.0.0-alpha1 ' ] ;
118+ $ versions = array ( '1.0-dev ' , '1.0.0-alpha1 ' ) ;
119119 $ parser = new VersionParser ($ versions );
120120 $ this ->assertSame ('1.0.0-alpha1 ' , $ parser ->getMostRecentUnstable ());
121121 }
@@ -124,7 +124,7 @@ public function testShouldSelectMostRecentUnstableFromVaryingNumeralCounts()
124124
125125 public function testShouldSelectMostRecentIgnoringStabilityExceptDevFromPrefixedSelection ()
126126 {
127- $ versions = [ 'v1.0.0b ' , 'v1.0.1 ' , 'v1.1.0a ' , 'v1.2.0-dev ' ] ;
127+ $ versions = array ( 'v1.0.0b ' , 'v1.0.1 ' , 'v1.1.0a ' , 'v1.2.0-dev ' ) ;
128128 $ parser = new VersionParser ($ versions );
129129 $ this ->assertSame ('v1.1.0a ' , $ parser ->getMostRecentAll ());
130130 }
0 commit comments