Chris@14: , Sebastian Heuer , Sebastian Bergmann Chris@14: * Chris@14: * For the full copyright and license information, please view the LICENSE Chris@14: * file that was distributed with this source code. Chris@14: */ Chris@14: Chris@14: namespace PharIo\Manifest; Chris@14: Chris@14: use PHPUnit\Framework\TestCase; Chris@14: Chris@14: /** Chris@14: * @covers PharIo\Manifest\Author Chris@14: * Chris@14: * @uses PharIo\Manifest\Email Chris@14: */ Chris@14: class AuthorTest extends TestCase { Chris@14: /** Chris@14: * @var Author Chris@14: */ Chris@14: private $author; Chris@14: Chris@14: protected function setUp() { Chris@14: $this->author = new Author('Joe Developer', new Email('user@example.com')); Chris@14: } Chris@14: Chris@14: public function testCanBeCreated() { Chris@14: $this->assertInstanceOf(Author::class, $this->author); Chris@14: } Chris@14: Chris@14: public function testNameCanBeRetrieved() { Chris@14: $this->assertEquals('Joe Developer', $this->author->getName()); Chris@14: } Chris@14: Chris@14: public function testEmailCanBeRetrieved() { Chris@14: $this->assertEquals('user@example.com', $this->author->getEmail()); Chris@14: } Chris@14: Chris@14: public function testCanBeUsedAsString() { Chris@14: $this->assertEquals('Joe Developer ', $this->author); Chris@14: } Chris@14: }