LicenseTest.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 PHPUnit\Framework\TestCase;
  12. /**
  13. * @covers PharIo\Manifest\License
  14. *
  15. * @uses PharIo\Manifest\Url
  16. */
  17. class LicenseTest extends TestCase {
  18. /**
  19. * @var License
  20. */
  21. private $license;
  22. protected function setUp() {
  23. $this->license = new License('BSD-3-Clause', new Url('https://github.com/sebastianbergmann/phpunit/blob/master/LICENSE'));
  24. }
  25. public function testCanBeCreated() {
  26. $this->assertInstanceOf(License::class, $this->license);
  27. }
  28. public function testNameCanBeRetrieved() {
  29. $this->assertEquals('BSD-3-Clause', $this->license->getName());
  30. }
  31. public function testUrlCanBeRetrieved() {
  32. $this->assertEquals('https://github.com/sebastianbergmann/phpunit/blob/master/LICENSE', $this->license->getUrl());
  33. }
  34. }