Skip to content
This repository was archived by the owner on May 2, 2023. It is now read-only.

Commit fb5821f

Browse files
author
Lars Vierbergen
committed
Also check the inverse function in tests
1 parent 9bb8597 commit fb5821f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

test.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ function testSatisfiedBy() {
163163
foreach($satisfies as $version) {
164164
$v=new version($version);
165165
$this->assertTrue($e->satisfiedBy($v), '['.$range.' :: '.$version.'] %s');
166+
$this->assertTrue($v->satisfies($e), '['.$range.' :: '.$version.'] %s');
166167
}
167168
}
168169
}

version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ function __construct($version) {
195195
parent::__construct($version);
196196
}
197197
function satisfies(versionExpression $versions) {
198-
return $versions->satisfiedBy($this->getString());
198+
return $versions->satisfiedBy($this);
199199
}
200200
}
201201
class versionException extends Exception {}

0 commit comments

Comments
 (0)