/** * @dataProvider provideEqualityDataset * * @covers ::calculate */ public function testCanCallStatically($a, $b, $expectedResult) { // ---------------------------------------------------------------- // setup your test $aVer = ParseSemanticVersion::from($a); $bVer = ParseSemanticVersion::from($b); // ---------------------------------------------------------------- // perform the change $actualResult = EqualTo::calculate($aVer, $bVer); // ---------------------------------------------------------------- // test the results $this->assertEquals($expectedResult, $actualResult); }
/** * does $a not equal $b? * * @param VersionNumber|string $a * the LHS of this calculation * @param VersionNumber|string $b * the RHS of this calculation * @param VersionParser|null $parser * the parser to use if $a or $b are strings * @return boolean * TRUE if $a == $b * FALSE otherwise */ public static function calculate($a, $b, VersionParser $parser = null) { return !EqualTo::calculate($a, $b, $parser); }