comparison vendor/phar-io/manifest/tests/xml/LicenseElementTest.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents
children
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
1 <?php
2
3 namespace PharIo\Manifest;
4
5 class LicenseElementTest extends \PHPUnit_Framework_TestCase {
6 /**
7 * @var LicenseElement
8 */
9 private $license;
10
11 protected function setUp() {
12 $dom = new \DOMDocument();
13 $dom->loadXML('<?xml version="1.0" ?><license xmlns="https://phar.io/xml/manifest/1.0" type="BSD-3" url="https://some.tld/LICENSE" />');
14 $this->license = new LicenseElement($dom->documentElement);
15 }
16
17 public function testTypeCanBeRetrieved() {
18 $this->assertEquals('BSD-3', $this->license->getType());
19 }
20
21 public function testUrlCanBeRetrieved() {
22 $this->assertEquals('https://some.tld/LICENSE', $this->license->getUrl());
23 }
24
25 }