Keine Beschreibung

ComponentElementTest.php 713B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace PharIo\Manifest;
  3. class ComponentElementTest extends \PHPUnit\Framework\TestCase {
  4. /**
  5. * @var ComponentElement
  6. */
  7. private $component;
  8. protected function setUp() {
  9. $dom = new \DOMDocument();
  10. $dom->loadXML('<?xml version="1.0" ?><component xmlns="https://phar.io/xml/manifest/1.0" name="phar-io/phive" version="0.6.0" />');
  11. $this->component = new ComponentElement($dom->documentElement);
  12. }
  13. public function testNameCanBeRetrieved() {
  14. $this->assertEquals('phar-io/phive', $this->component->getName());
  15. }
  16. public function testEmailCanBeRetrieved() {
  17. $this->assertEquals('0.6.0', $this->component->getVersion());
  18. }
  19. }