Implemented tests for UserRepository and mapped data schema

This commit is contained in:
Kevin Frantz
2018-11-17 14:48:48 +01:00
parent 5feac4d8ca
commit a7c58ba135
10 changed files with 24 additions and 9 deletions

View File

@@ -21,9 +21,9 @@ class AbstractEntityTest extends TestCase
public function testConstructor(): void
{
$this->assertEquals(0, $this->entity->getVersion());
$this->expectException(\TypeError::class);
$this->entity->getId();
$this->entity->getVersion();
}
public function testVersion(): void

View File

@@ -23,6 +23,7 @@ class RelationTest extends TestCase
{
$this->assertInstanceOf(Collection::class, $this->relation->getChilds());
$this->assertInstanceOf(Collection::class, $this->relation->getParents());
$this->assertEquals(0, $this->relation->getVersion());
$this->expectException(\TypeError::class);
$this->relation->getSource();
}

View File

@@ -32,6 +32,7 @@ class UserTest extends TestCase
public function testConstructor(): void
{
$this->assertInstanceOf(UserInterface::class, new User());
$this->assertEquals(0, $this->user->getVersion());
}
public function testUsername(): void