Files
abcParser/tests/unit/AbcParser/Application/PersonFactoryTest.php
richard 2cdf7dd1cf
Some checks failed
abc-api/abcParser/pipeline/head There was a failure building this commit
update webpatser/laravel-uuid to version 3
2020-06-20 12:36:34 -04:00

31 lines
750 B
PHP
Executable File

<?php
namespace Tests\Unit\AbcParser\Application;
use Enzyme\Axiom\Atoms\StringAtom;
use PHPUnit_Framework_TestCase;
use XaiCorp\AbcParser\Application\PersonFactory;
use XaiCorp\AbcParser\Domain\Atoms\EmailAtom;
use XaiCorp\AbcParser\Domain\Core\Person;
class PersonFactoryTest extends PHPUnit_Framework_TestCase
{
public function testCreate()
{
$factory = new PersonFactory();
$this->assertInstanceOf(PersonFactory::class, $factory);
}
public function testCreatePerson()
{
$factory = new PersonFactory();
$name = new StringAtom('Roger');
$email = new EmailAtom('');
$result = $factory->create($name, $email);
$this->assertInstanceOf(Person::class, $result);
}
}