AuthorElementTest.php 707B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace PharIo\Manifest;
  3. class AuthorElementTest extends \PHPUnit_Framework_TestCase {
  4. /**
  5. * @var AuthorElement
  6. */
  7. private $author;
  8. protected function setUp() {
  9. $dom = new \DOMDocument();
  10. $dom->loadXML('<?xml version="1.0" ?><author xmlns="https://phar.io/xml/manifest/1.0" name="Reiner Zufall" email="reiner@zufall.de" />');
  11. $this->author = new AuthorElement($dom->documentElement);
  12. }
  13. public function testNameCanBeRetrieved() {
  14. $this->assertEquals('Reiner Zufall', $this->author->getName());
  15. }
  16. public function testEmailCanBeRetrieved() {
  17. $this->assertEquals('reiner@zufall.de', $this->author->getEmail());
  18. }
  19. }