コード例 #1
0
 /**
  * @covers ::from
  * @dataProvider provideBadVersionStrings
  * @expectedException GanbaroDigital\Versions\Exceptions\E4xx_BadVersionString
  */
 public function testRejectsBadVersionStrings($data)
 {
     // ----------------------------------------------------------------
     // setup your test
     // ----------------------------------------------------------------
     // perform the change
     ParseHashedVersion::from($data);
 }
コード例 #2
0
 /**
  * @covers ::calculate
  * @dataProvider provideVersionsThatCannotBeCompared
  * @expectedException GanbaroDigital\Versions\Exceptions\E4xx_UnsupportedOperation
  */
 public function testThrowsExceptionWhenVersionsCannotBeCompared($versionA, $versionB)
 {
     // ----------------------------------------------------------------
     // setup your test
     $verA = ParseHashedVersion::from($versionA);
     $verB = ParseHashedVersion::from($versionB);
     // ----------------------------------------------------------------
     // perform the change
     $actualResult = CompareHashedVersions::calculate($verA, $verB);
 }