finished default parser
This commit is contained in:
36
tests/unit/Application/PersonFactoryTest.php
Normal file
36
tests/unit/Application/PersonFactoryTest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: richard
|
||||
* Date: 11/19/17
|
||||
* Time: 4:49 PM
|
||||
*/
|
||||
|
||||
namespace Tests\Unit\Application;
|
||||
|
||||
use Enzyme\Axiom\Atoms\StringAtom;
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user