BundledComponentTest.php 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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\Version;
  12. use PHPUnit\Framework\TestCase;
  13. /**
  14. * @covers PharIo\Manifest\BundledComponent
  15. *
  16. * @uses \PharIo\Version\Version
  17. */
  18. class BundledComponentTest extends TestCase {
  19. /**
  20. * @var BundledComponent
  21. */
  22. private $bundledComponent;
  23. protected function setUp() {
  24. $this->bundledComponent = new BundledComponent('phpunit/php-code-coverage', new Version('4.0.2'));
  25. }
  26. public function testCanBeCreated() {
  27. $this->assertInstanceOf(BundledComponent::class, $this->bundledComponent);
  28. }
  29. public function testNameCanBeRetrieved() {
  30. $this->assertEquals('phpunit/php-code-coverage', $this->bundledComponent->getName());
  31. }
  32. public function testVersionCanBeRetrieved() {
  33. $this->assertEquals('4.0.2', $this->bundledComponent->getVersion()->getVersionString());
  34. }
  35. }