comparison vendor/phar-io/manifest/tests/values/PhpVersionRequirementTest.php @ 2:5311817fb629

Theme updates
author Chris Cannam
date Tue, 10 Jul 2018 13:19:18 +0000
parents
children
comparison
equal deleted inserted replaced
1:0b0e5f3b1e83 2:5311817fb629
1 <?php
2 /*
3 * This file is part of PharIo\Manifest.
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\Manifest;
12
13 use PharIo\Version\ExactVersionConstraint;
14 use PHPUnit\Framework\TestCase;
15
16 /**
17 * @covers PharIo\Manifest\PhpVersionRequirement
18 *
19 * @uses \PharIo\Version\VersionConstraint
20 */
21 class PhpVersionRequirementTest extends TestCase {
22 /**
23 * @var PhpVersionRequirement
24 */
25 private $requirement;
26
27 protected function setUp() {
28 $this->requirement = new PhpVersionRequirement(new ExactVersionConstraint('7.1.0'));
29 }
30
31 public function testCanBeCreated() {
32 $this->assertInstanceOf(PhpVersionRequirement::class, $this->requirement);
33 }
34
35 public function testVersionConstraintCanBeRetrieved() {
36 $this->assertEquals('7.1.0', $this->requirement->getVersionConstraint()->asString());
37 }
38 }