123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- namespace PharIo\Manifest;
- use PHPUnit\Framework\TestCase;
- class CopyrightInformationTest extends TestCase {
-
- private $copyrightInformation;
-
- private $author;
-
- private $license;
- protected function setUp() {
- $this->author = new Author('Joe Developer', new Email('user@example.com'));
- $this->license = new License('BSD-3-Clause', new Url('https://github.com/sebastianbergmann/phpunit/blob/master/LICENSE'));
- $authors = new AuthorCollection;
- $authors->add($this->author);
- $this->copyrightInformation = new CopyrightInformation($authors, $this->license);
- }
- public function testCanBeCreated() {
- $this->assertInstanceOf(CopyrightInformation::class, $this->copyrightInformation);
- }
- public function testAuthorsCanBeRetrieved() {
- $this->assertContains($this->author, $this->copyrightInformation->getAuthors());
- }
- public function testLicenseCanBeRetrieved() {
- $this->assertEquals($this->license, $this->copyrightInformation->getLicense());
- }
- }
|