Ejemplo n.º 1
0
 /**
  * Return true if the left version is less or equal to the right version.
  *
  * @param VersionInterface $lVersion
  * @param VersionInterface $rVersion
  *
  * @return boolean
  */
 public function compare(VersionInterface $lVersion, VersionInterface $rVersion)
 {
     $lessThan = new LessThan();
     $equalTo = new EqualTo();
     return $lessThan->compare($lVersion, $rVersion) || $equalTo->compare($lVersion, $rVersion);
 }
Ejemplo n.º 2
0
 /**
  * Return true if the left version is greater than right version.
  *
  * @param VersionInterface $lVersion
  * @param VersionInterface $rVersion
  *
  * @return boolean
  */
 public function compare(VersionInterface $lVersion, VersionInterface $rVersion)
 {
     $lessThan = new LessThan();
     return $lessThan->compare($rVersion, $lVersion);
 }
 /**
  * @dataProvider isNotLessProvider
  *
  * @param Version $lVersion
  * @param Version $rVersion
  */
 public function testIsNotLess($lVersion, $rVersion)
 {
     $lessThan = new LessThan();
     $this->assertFalse($lessThan->compare($lVersion, $rVersion));
 }