| @@ 252-258 (lines=7) @@ | ||
| 249 | * @param string $expect Expected result converted to a string, '>', '==', or '<'. |
|
| 250 | * @param string $b Version B. |
|
| 251 | */ |
|
| 252 | public function testCompareVersions( $a, $expect, $b ) { |
|
| 253 | $obj = new SemverVersioning( array() ); |
|
| 254 | $ret = $obj->compareVersions( $a, $b ); |
|
| 255 | $this->assertIsInt( $ret ); |
|
| 256 | $ret = $ret < 0 ? '<' : ( $ret > 0 ? '>' : '==' ); |
|
| 257 | $this->assertSame( $expect, $ret ); |
|
| 258 | } |
|
| 259 | ||
| 260 | /** |
|
| 261 | * Data provider for testCompareVersions. |
|
| @@ 260-266 (lines=7) @@ | ||
| 257 | * @param string $expect Expected result converted to a string, '>', '==', or '<'. |
|
| 258 | * @param string $b Version B. |
|
| 259 | */ |
|
| 260 | public function testCompareVersions( $a, $expect, $b ) { |
|
| 261 | $obj = new WordpressVersioning( array() ); |
|
| 262 | $ret = $obj->compareVersions( $a, $b ); |
|
| 263 | $this->assertIsInt( $ret ); |
|
| 264 | $ret = $ret < 0 ? '<' : ( $ret > 0 ? '>' : '==' ); |
|
| 265 | $this->assertSame( $expect, $ret ); |
|
| 266 | } |
|
| 267 | ||
| 268 | /** |
|
| 269 | * Data provider for testCompareVersions. |
|