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\Email Chris@14: */ Chris@14: class EmailTest extends TestCase { Chris@14: public function testCanBeCreatedForValidEmail() { Chris@14: $this->assertInstanceOf(Email::class, new Email('user@example.com')); Chris@14: } Chris@14: Chris@14: public function testCanBeUsedAsString() { Chris@14: $this->assertEquals('user@example.com', new Email('user@example.com')); Chris@14: } Chris@14: Chris@14: /** Chris@14: * @covers PharIo\Manifest\InvalidEmailException Chris@14: */ Chris@14: public function testCannotBeCreatedForInvalidEmail() { Chris@14: $this->expectException(InvalidEmailException::class); Chris@14: Chris@14: new Email('invalid'); Chris@14: } Chris@14: }