Ingen beskrivning

LicenseElementTest.php 709B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace PharIo\Manifest;
  3. class LicenseElementTest extends \PHPUnit\Framework\TestCase {
  4. /**
  5. * @var LicenseElement
  6. */
  7. private $license;
  8. protected function setUp() {
  9. $dom = new \DOMDocument();
  10. $dom->loadXML('<?xml version="1.0" ?><license xmlns="https://phar.io/xml/manifest/1.0" type="BSD-3" url="https://some.tld/LICENSE" />');
  11. $this->license = new LicenseElement($dom->documentElement);
  12. }
  13. public function testTypeCanBeRetrieved() {
  14. $this->assertEquals('BSD-3', $this->license->getType());
  15. }
  16. public function testUrlCanBeRetrieved() {
  17. $this->assertEquals('https://some.tld/LICENSE', $this->license->getUrl());
  18. }
  19. }