PhpVersionRequirementTest.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. namespace PharIo\Manifest;
  11. use PharIo\Version\ExactVersionConstraint;
  12. use PHPUnit\Framework\TestCase;
  13. /**
  14. * @covers PharIo\Manifest\PhpVersionRequirement
  15. *
  16. * @uses \PharIo\Version\VersionConstraint
  17. */
  18. class PhpVersionRequirementTest extends TestCase {
  19. /**
  20. * @var PhpVersionRequirement
  21. */
  22. private $requirement;
  23. protected function setUp() {
  24. $this->requirement = new PhpVersionRequirement(new ExactVersionConstraint('7.1.0'));
  25. }
  26. public function testCanBeCreated() {
  27. $this->assertInstanceOf(PhpVersionRequirement::class, $this->requirement);
  28. }
  29. public function testVersionConstraintCanBeRetrieved() {
  30. $this->assertEquals('7.1.0', $this->requirement->getVersionConstraint()->asString());
  31. }
  32. }