Mercurial > hg > isophonics-drupal-site
comparison vendor/phar-io/version/tests/Unit/AnyVersionConstraintTest.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
1 <?php | |
2 /* | |
3 * This file is part of PharIo\Version. | |
4 * | |
5 * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> | |
6 * | |
7 * For the full copyright and license information, please view the LICENSE | |
8 * file that was distributed with this source code. | |
9 */ | |
10 | |
11 namespace PharIo\Version; | |
12 | |
13 use PHPUnit\Framework\TestCase; | |
14 | |
15 /** | |
16 * @covers PharIo\Version\AnyVersionConstraint | |
17 */ | |
18 class AnyVersionConstraintTest extends TestCase { | |
19 public function versionProvider() { | |
20 return [ | |
21 [new Version('1.0.2')], | |
22 [new Version('4.8')], | |
23 [new Version('0.1.1-dev')] | |
24 ]; | |
25 } | |
26 | |
27 /** | |
28 * @dataProvider versionProvider | |
29 * | |
30 * @param Version $version | |
31 */ | |
32 public function testReturnsTrue(Version $version) { | |
33 $constraint = new AnyVersionConstraint; | |
34 | |
35 $this->assertTrue($constraint->complies($version)); | |
36 } | |
37 | |
38 public function testAsString() { | |
39 $this->assertSame('*', (new AnyVersionConstraint())->asString()); | |
40 } | |
41 } |