Commit f8f2e054 authored by Jacob Priddy's avatar Jacob Priddy 👌
Browse files

Fix and refactor tests

parent 9890a28f
......@@ -54,7 +54,7 @@ class AttemptDatabaseTest extends DatabaseTestCase
$this->repository->add(new Attempt(0, $d1->getId()));
$this->repository->add(new Attempt(0, $d2->getId()));
$attempts = $this->repository->getBetween(Carbon::now()->subMinute(), Carbon::now()->addDay());
$this->assertCount(2, $attempts);
self::assertCount(2, $attempts);
}
......@@ -73,6 +73,6 @@ class AttemptDatabaseTest extends DatabaseTestCase
$this->repository->add(new Attempt(0, $d1->getId()));
$this->repository->add(new Attempt(0, $d2->getId()));
$attempts = $this->repository->getBetween(Carbon::now()->subMinute(), Carbon::now()->addDay(), $d1->getId());
$this->assertCount(1, $attempts);
self::assertCount(1, $attempts);
}
}
......@@ -31,16 +31,16 @@ class DoorDatabaseTest extends DatabaseTestCase
$found = $this->doors->getByToken(new HashedSearchable('token'));
$this->assertEquals('loc', $found->getLocation());
$this->assertEquals('name', $found->getName());
$this->assertNull($this->doors->getByToken(new HashedSearchable('i am autistic')));
$this->assertNotNull($this->doors->get($d->getId()));
$this->assertNull($this->doors->get('asdf'));
$this->assertCount(1, $this->doors->search());
$this->assertNotNull($this->doors->findByName('name'));
$this->assertNull($this->doors->findByName('ree'));
$this->assertNull($this->doors->findByName(null));
self::assertEquals('loc', $found->getLocation());
self::assertEquals('name', $found->getName());
self::assertNull($this->doors->getByToken(new HashedSearchable('i am autistic')));
self::assertNotNull($this->doors->get($d->getId()));
self::assertNull($this->doors->get('asdf'));
self::assertCount(1, $this->doors->search());
self::assertNotNull($this->doors->findByName('name'));
self::assertNull($this->doors->findByName('ree'));
self::assertNull($this->doors->findByName(null));
}
/**
......@@ -50,10 +50,10 @@ class DoorDatabaseTest extends DatabaseTestCase
public function it_deletes_doors(): void
{
$d = $this->doors->create(new Door(0, 'loc', 'name', new HashedSearchable('token')));
$this->assertEquals(0, $this->doors->delete('ah idk if im gonna finish this project. Im sorry'));
$this->assertCount(1, $this->doors->search());
$this->assertEquals(1, $this->doors->delete($d->getId()));
$this->assertCount(0, $this->doors->search());
self::assertEquals(0, $this->doors->delete('ah idk if im gonna finish this project. Im sorry'));
self::assertCount(1, $this->doors->search());
self::assertEquals(1, $this->doors->delete($d->getId()));
self::assertCount(0, $this->doors->search());
}
/**
......@@ -74,7 +74,7 @@ class DoorDatabaseTest extends DatabaseTestCase
public function it_gets_a_door(): void
{
$d = $this->doors->create(new Door(0, 'loc', 'name', new HashedSearchable('token')));
$this->assertEquals($d, $this->doors->get($d->getId()));
self::assertEquals($d, $this->doors->get($d->getId()));
}
/**
......@@ -84,9 +84,9 @@ class DoorDatabaseTest extends DatabaseTestCase
public function it_sets_last_seen_on_door_token_retrieve(): void
{
$d = $this->doors->create(new Door(0, 'loc', 'name', new HashedSearchable('token')));
$this->assertNull($d->getLastSeenAt());
self::assertNull($d->getLastSeenAt());
$d = $this->doors->getByToken($d->getToken());
$this->assertNotNull($d->getToken());
self::assertNotNull($d->getToken());
}
/**
......@@ -98,9 +98,9 @@ class DoorDatabaseTest extends DatabaseTestCase
$d = $this->doors->create(new Door(0, 'loc', 'name', new HashedSearchable('token')));
$this->doors->update($d->getId(), new Door(0, 'new loc', 'othername', new HashedSearchable('new tok')));
$door = $this->doors->get($d->getId());
$this->assertEquals('new loc', $door->getLocation());
$this->assertEquals('othername', $door->getName());
$this->assertEquals('new tok', $door->getToken()->getHash());
self::assertEquals('new loc', $door->getLocation());
self::assertEquals('othername', $door->getName());
self::assertEquals('new tok', $door->getToken()->getHash());
}
/**
......@@ -112,7 +112,7 @@ class DoorDatabaseTest extends DatabaseTestCase
$d = $this->doors->create(new Door(0, 'loc', 'name', new HashedSearchable('token')));
$this->doors->update($d->getId(), $d);
// Make sure no exceptions are thrown
$this->assertTrue(true);
self::assertTrue(true);
}
/**
......@@ -137,8 +137,8 @@ class DoorDatabaseTest extends DatabaseTestCase
$d = $this->doors->create(new Door(0, 'loc', 'name', new HashedSearchable('token1')));
$this->doors->touch($d->getId(), $now, 'version');
$actual = $this->doors->get($d->getId());
$this->assertEquals($now, $actual->getLastSeenAt());
$this->assertEquals('version', $actual->getVersion());
self::assertEquals($now, $actual->getLastSeenAt());
self::assertEquals('version', $actual->getVersion());
}
/**
......@@ -151,7 +151,7 @@ class DoorDatabaseTest extends DatabaseTestCase
$d = $this->doors->create(new Door(0, 'loc', 'name', new HashedSearchable('token1'), 'version'));
$this->doors->touch($d->getId(), $now, null);
$actual = $this->doors->get($d->getId());
$this->assertEquals($now, $actual->getLastSeenAt());
$this->assertEquals('version', $actual->getVersion());
self::assertEquals($now, $actual->getLastSeenAt());
self::assertEquals('version', $actual->getVersion());
}
}
......@@ -144,8 +144,8 @@ class DoorGroupDatabaseTest extends DatabaseTestCase
$this->repository->addDoorToGroup($d1->getId(), $g1->getId());
$this->repository->addDoorToGroup($d2->getId(), $g2->getId());
$groups = $this->repository->getGroupsForDoor($d1->getId());
$this->assertCount(1, $groups);
$this->assertEquals($g1->getId(), $groups[0]->getId());
self::assertCount(1, $groups);
self::assertEquals($g1->getId(), $groups[0]->getId());
}
/**
......@@ -161,7 +161,7 @@ class DoorGroupDatabaseTest extends DatabaseTestCase
$g2 = $this->createGroup('g2');
$this->repository->addDoorToGroup($d1->getId(), $g1->getId());
$this->repository->addDoorToGroup($d2->getId(), $g2->getId());
$this->assertCount(1, $this->repository->getDoorsForGroup($g1->getId()));
self::assertCount(1, $this->repository->getDoorsForGroup($g1->getId()));
}
/**
......@@ -176,8 +176,8 @@ class DoorGroupDatabaseTest extends DatabaseTestCase
$g1 = $this->createGroup('g1');
$this->repository->addDoorToGroup($d1->getId(), $g1->getId());
$this->repository->addDoorToGroup($d2->getId(), $g1->getId());
$this->assertCount(2, $this->repository->getDoorsForGroup($g1->getId()));
self::assertCount(2, $this->repository->getDoorsForGroup($g1->getId()));
$this->repository->removeDoorFromGroup($d1->getId(), $g1->getId());
$this->assertCount(1, $this->repository->getDoorsForGroup($g1->getId()));
self::assertCount(1, $this->repository->getDoorsForGroup($g1->getId()));
}
}
......@@ -84,7 +84,7 @@ class DoorScheduleDatabaseTest extends DatabaseTestCase
{
$schedules = $this->db->getActiveSchedulesForDoor('1');
$this->assertEquals([], $schedules);
self::assertEquals([], $schedules);
}
/**
......@@ -131,9 +131,9 @@ class DoorScheduleDatabaseTest extends DatabaseTestCase
$schedules = $this->db->getActiveSchedulesForDoor($d1->getId());
$this->assertCount(2, $schedules);
$this->assertEquals($s1->getId(), $schedules[0]->getId());
$this->assertEquals($s2->getId(), $schedules[1]->getId());
self::assertCount(2, $schedules);
self::assertEquals($s1->getId(), $schedules[0]->getId());
self::assertEquals($s2->getId(), $schedules[1]->getId());
}
/**
......@@ -160,7 +160,7 @@ class DoorScheduleDatabaseTest extends DatabaseTestCase
$schedules = $this->db->getActiveSchedulesForDoor($d->getId());
$this->assertCount(0, $schedules);
self::assertCount(0, $schedules);
}
/**
......@@ -188,7 +188,7 @@ class DoorScheduleDatabaseTest extends DatabaseTestCase
$schedules = $this->db->getActiveSchedulesForDoor($d->getId());
$this->schedules->create(new Schedule(0, Schedule::TYPE_OPEN_MODE, '', 1235, '', Carbon::now()->addDay(), Carbon::now()->addDays(10)));
$this->assertCount(0, $schedules);
self::assertCount(0, $schedules);
}
......@@ -242,10 +242,10 @@ class DoorScheduleDatabaseTest extends DatabaseTestCase
$schedules = $this->db->getSchedulesForDoorBetween($d1->getId(), Carbon::now()->subMinute(), Carbon::now()->addMinute());
$this->assertCount(3, $schedules);
$this->assertEquals($s1->getId(), $schedules[0]->getId());
$this->assertEquals($s2->getId(), $schedules[1]->getId());
$this->assertEquals($s3->getId(), $schedules[2]->getId());
self::assertCount(3, $schedules);
self::assertEquals($s1->getId(), $schedules[0]->getId());
self::assertEquals($s2->getId(), $schedules[1]->getId());
self::assertEquals($s3->getId(), $schedules[2]->getId());
}
/**
......@@ -309,7 +309,7 @@ class DoorScheduleDatabaseTest extends DatabaseTestCase
$schedules = $this->db->getSchedulesForDoorAndUserBetween($d1->getId(), $u1->getId(), Carbon::now()->subMinute(), Carbon::now()->addMinute());
$this->assertCount(1, $schedules);
$this->assertEquals($s2->getId(), $schedules[0]->getId());
self::assertCount(1, $schedules);
self::assertEquals($s2->getId(), $schedules[0]->getId());
}
}
......@@ -64,7 +64,7 @@ class DoorUserDatabaseTest extends DatabaseTestCase
public function it_works_with_no_entries(): void
{
$groups = $this->db->getDoorUserGroupIntersection('1', '1');
$this->assertEquals([], $groups);
self::assertEquals([], $groups);
}
/**
......@@ -118,8 +118,8 @@ class DoorUserDatabaseTest extends DatabaseTestCase
$this->groupUsers->addUserToGroup($u1->getId(), $g2->getId());
$groups = $this->db->getDoorUserGroupIntersection($d1->getId(), $u1->getId());
$this->assertCount(1, $groups);
$this->assertEquals('title', $groups[0]->getTitle());
$this->assertEquals('description', $groups[0]->getDescription());
self::assertCount(1, $groups);
self::assertEquals('title', $groups[0]->getTitle());
self::assertEquals('description', $groups[0]->getDescription());
}
}
......@@ -81,9 +81,9 @@ class EntriesDatabaseTest extends DatabaseTestCase
$this->repository->add(new Entry(0, $u1->getId(), $d1->getId(), true));
$this->repository->add(new Entry(0, $u2->getId(), $d1->getId(), true));
$this->repository->add(new Entry(0, $u2->getId(), $d2->getId(), false));
$this->assertCount(2, $this->repository->get($begin, $end, null, $d1->getId()));
$this->assertCount(2, $this->repository->get($begin, $end, $u2->getId(), null));
$this->assertCount(1, $this->repository->get($begin, $end, $u2->getId(), $d1->getId()));
self::assertCount(2, $this->repository->get($begin, $end, null, $d1->getId()));
self::assertCount(2, $this->repository->get($begin, $end, $u2->getId(), null));
self::assertCount(1, $this->repository->get($begin, $end, $u2->getId(), $d1->getId()));
}
/**
......@@ -103,6 +103,6 @@ class EntriesDatabaseTest extends DatabaseTestCase
$this->repository->add(new Entry(0, $u1->getId(), $d1->getId(), true));
$this->repository->add(new Entry(0, $u2->getId(), $d1->getId(), true));
$this->repository->add(new Entry(0, $u2->getId(), $d2->getId(), false));
$this->assertCount(3, $this->repository->get(Carbon::now()->subDays(1), Carbon::now()->addDay()));
self::assertCount(3, $this->repository->get(Carbon::now()->subDays(1), Carbon::now()->addDay()));
}
}
......@@ -30,14 +30,14 @@ class GroupDatabaseTest extends DatabaseTestCase
{
$all = $this->groups->search(null);
$this->assertEquals([], $all);
self::assertEquals([], $all);
$this->groups->create(new Group(0, 't1', ''));
$this->groups->create(new Group(0, 't2', ''));
$all = $this->groups->search(null);
$this->assertCount(2, $all);
self::assertCount(2, $all);
}
/**
......@@ -48,11 +48,11 @@ class GroupDatabaseTest extends DatabaseTestCase
{
$group = $this->groups->get(10);
$this->assertNull($group);
self::assertNull($group);
$group = $this->groups->create(new Group(0, '', ''));
$this->assertEquals($group, $this->groups->get($group->getId()));
self::assertEquals($group, $this->groups->get($group->getId()));
}
/**
......@@ -60,7 +60,7 @@ class GroupDatabaseTest extends DatabaseTestCase
*/
public function it_cannot_get_non_existent_user(): void
{
$this->assertNull($this->groups->get('asdf'));
self::assertNull($this->groups->get('asdf'));
}
/**
......@@ -71,7 +71,7 @@ class GroupDatabaseTest extends DatabaseTestCase
{
$group = $this->groups->create(new Group(0, '', ''));
$this->assertEquals($group, $this->groups->get($group->getId()));
self::assertEquals($group, $this->groups->get($group->getId()));
}
/**
......@@ -82,13 +82,13 @@ class GroupDatabaseTest extends DatabaseTestCase
{
$group = $this->groups->create(new Group(0, '', ''));
$this->assertTrue($this->groups->delete($group->getId()));
self::assertTrue($this->groups->delete($group->getId()));
$this->assertFalse($this->groups->exists(new Group(9999999, '', '')));
self::assertFalse($this->groups->exists(new Group(9999999, '', '')));
$this->assertFalse($this->groups->delete(2));
self::assertFalse($this->groups->delete(2));
$this->assertFalse($this->groups->delete('asdf'));
self::assertFalse($this->groups->delete('asdf'));
}
/**
......@@ -99,8 +99,8 @@ class GroupDatabaseTest extends DatabaseTestCase
{
$this->groups->create(new Group(0, '', ''));
$this->assertFalse($this->groups->exists(new Group(0, 'asdf', 'asdf')));
$this->assertTrue($this->groups->exists(new Group(0, '', '')));
self::assertFalse($this->groups->exists(new Group(0, 'asdf', 'asdf')));
self::assertTrue($this->groups->exists(new Group(0, '', '')));
}
/**
......@@ -115,8 +115,8 @@ class GroupDatabaseTest extends DatabaseTestCase
$group = $this->groups->get($g->getId());
$this->assertEquals('new title', $group->getTitle());
$this->assertEquals('new desc', $group->getDescription());
self::assertEquals('new title', $group->getTitle());
self::assertEquals('new desc', $group->getDescription());
}
/**
......@@ -125,7 +125,7 @@ class GroupDatabaseTest extends DatabaseTestCase
*/
public function it_cannot_update_non_existent_group(): void
{
$this->assertNull($this->groups->update(1, new Group(0, 'new title', 'new desc')));
self::assertNull($this->groups->update(1, new Group(0, 'new title', 'new desc')));
}
/**
......
......@@ -55,15 +55,15 @@ class GroupScheduleDatabaseTest extends DatabaseTestCase
$this->db->addSchedulesToGroups([$s1->getId(), $s2->getId()], [$g1->getId(), $g2->getId()]);
$this->assertEquals([$s1, $s2], $this->db->getSchedulesForGroup($g1->getId()));
$this->assertEquals([$g1, $g2], $this->db->getGroupsForSchedule($s1->getId()));
self::assertEquals([$s1, $s2], $this->db->getSchedulesForGroup($g1->getId()));
self::assertEquals([$g1, $g2], $this->db->getGroupsForSchedule($s1->getId()));
$this->db->removeSchedulesFromGroups([$s1->getId(), $s2->getId()], [$g1->getId()]);
$this->assertEquals([], $this->db->getSchedulesForGroup($g1->getId()));
$this->assertEquals([$g2], $this->db->getGroupsForSchedule($s1->getId()));
$this->assertEquals([$s1, $s2], $this->db->getSchedulesForGroup($g2->getId()));
$this->assertEquals([$g2], $this->db->getGroupsForSchedule($s2->getId()));
self::assertEquals([], $this->db->getSchedulesForGroup($g1->getId()));
self::assertEquals([$g2], $this->db->getGroupsForSchedule($s1->getId()));
self::assertEquals([$s1, $s2], $this->db->getSchedulesForGroup($g2->getId()));
self::assertEquals([$g2], $this->db->getGroupsForSchedule($s2->getId()));
}
/**
......@@ -76,7 +76,7 @@ class GroupScheduleDatabaseTest extends DatabaseTestCase
$this->db->removeSchedulesFromGroups([123, 234], [123, 432]);
$this->assertTrue(true);
self::assertTrue(true);
}
/**
......@@ -103,7 +103,7 @@ class GroupScheduleDatabaseTest extends DatabaseTestCase
$this->db->removeSchedulesFromGroups([123], [$g->getId()]);
$this->assertTrue(true);
self::assertTrue(true);
}
/**
......@@ -137,9 +137,9 @@ class GroupScheduleDatabaseTest extends DatabaseTestCase
$schedules = $this->db->getActiveForGroupAndDate($g1->getId(), $searchDate, null);
$this->assertEquals([$s1, $s2], $schedules);
self::assertEquals([$s1, $s2], $schedules);
$schedules = $this->db->getActiveForGroupAndDate($g1->getId(), $searchDate, Schedule::TYPE_OPEN_MODE);
$this->assertEquals([$s1], $schedules);
self::assertEquals([$s1], $schedules);
}
}
......@@ -124,11 +124,11 @@ class GroupUserDatabaseTest extends DatabaseTestCase
{
$this->groupUsers->addUserToGroup($this->user->getId(), $this->group->getId());
$this->assertCount(1, $this->groupUsers->getGroupsForUser($this->user->getId()));
self::assertCount(1, $this->groupUsers->getGroupsForUser($this->user->getId()));
$this->groupUsers->removeUserFromGroup($this->user->getId(), $this->group->getId());
$this->assertCount(0, $this->groupUsers->getGroupsForUser($this->user->getId()));
self::assertCount(0, $this->groupUsers->getGroupsForUser($this->user->getId()));
}
/**
......@@ -139,6 +139,6 @@ class GroupUserDatabaseTest extends DatabaseTestCase
{
$this->groupUsers->addUserToGroup($this->user->getId(), $this->group->getId());
$this->assertCount(1, $this->groupUsers->getUsersForGroup($this->group->getId()));
self::assertCount(1, $this->groupUsers->getUsersForGroup($this->group->getId()));
}
}
......@@ -97,8 +97,8 @@ class OverrideDatabaseTest extends DatabaseTestCase
Carbon::now()->addHour()
));
$this->assertCount(1, $this->repository->filterHistory($d1->getId(), null, null, null));
$this->assertCount(1, $this->repository->filterHistory(null, null, Carbon::now()->addMinute(), Carbon::now()->addMinutes(2)));
self::assertCount(1, $this->repository->filterHistory($d1->getId(), null, null, null));
self::assertCount(1, $this->repository->filterHistory(null, null, Carbon::now()->addMinute(), Carbon::now()->addMinutes(2)));
}
/**
......@@ -130,9 +130,9 @@ class OverrideDatabaseTest extends DatabaseTestCase
Carbon::now()->addHour(),
Carbon::now()->subMinute()
));
$this->assertNull($this->repository->activeOverrideForDoorBetween($d1->getId(), Carbon::now(), Carbon::now()->addSecond()));
self::assertNull($this->repository->activeOverrideForDoorBetween($d1->getId(), Carbon::now(), Carbon::now()->addSecond()));
// It picks the latest override
$this->assertEquals(Override::TYPE_OPEN, $this->repository->activeOverrideForDoorBetween($d1->getId(), Carbon::now(), Carbon::now()->addHours(3))->getType());
self::assertEquals(Override::TYPE_OPEN, $this->repository->activeOverrideForDoorBetween($d1->getId(), Carbon::now(), Carbon::now()->addHours(3))->getType());
}
/**
......
......@@ -71,9 +71,9 @@ class ScheduleDatabaseTest extends DatabaseTestCase
$s1 = $this->createScheduleWithDates(Carbon::now()->subDays(2), Carbon::now()->subDay());
$this->createScheduleWithDates(Carbon::now()->subDay(), Carbon::now()->addDays(2), Schedule::TYPE_USER_ACCESS);
$this->assertNotNull($this->repository->get($s1->getId()));
$this->assertCount(1, $this->repository->filter(null, Carbon::now(), Carbon::now()->addMinute()));
$this->assertCount(2, $this->repository->filter());
self::assertNotNull($this->repository->get($s1->getId()));
self::assertCount(1, $this->repository->filter(null, Carbon::now(), Carbon::now()->addMinute()));
self::assertCount(2, $this->repository->filter());
}
/**
......@@ -96,10 +96,10 @@ class ScheduleDatabaseTest extends DatabaseTestCase
));
$s = $this->repository->get($s1->getId());
$this->assertEquals('rset', $s->getRset());
$this->assertEquals(100, $s->getDuration());
$this->assertEquals(Schedule::TYPE_USER_ACCESS, $s->getType());
$this->assertEquals('description', $s->getDescription());
self::assertEquals('rset', $s->getRset());
self::assertEquals(100, $s->getDuration());
self::assertEquals(Schedule::TYPE_USER_ACCESS, $s->getType());
self::assertEquals('description', $s->getDescription());
}
/**
......@@ -108,8 +108,8 @@ class ScheduleDatabaseTest extends DatabaseTestCase
public function it_deletes_schedules(): void
{
$s = $this->repository->create(new Schedule(0, Schedule::TYPE_OPEN_MODE, '', 123, '', Carbon::now()));
$this->assertCount(1, $this->repository->filter());
$this->assertEquals(1, $this->repository->delete([$s->getId(), 2342]));
$this->assertCount(0, $this->repository->filter());
self::assertCount(1, $this->repository->filter());
self::assertEquals(1, $this->repository->delete([$s->getId(), 2342]));
self::assertCount(0, $this->repository->filter());
}
}
......@@ -74,11 +74,11 @@ class TokenDatabaseTest extends DatabaseTestCase
$dbToken = $this->tokens->findValidToken($this->createTokenHash(self::VALID_TOKEN));
$this->assertEquals($token, $dbToken);
self::assertEquals($token, $dbToken);
$nullToken = $this->tokens->findValidToken($this->createTokenHash('reee'));
$this->assertNull($nullToken);
self::assertNull($nullToken);
}
/**
......@@ -91,7 +91,7 @@ class TokenDatabaseTest extends DatabaseTestCase
$token = $this->tokens->findValidToken($this->createTokenHash(self::VALID_TOKEN));
$this->assertNull($token);
self::assertNull($token);
}
/**
......@@ -104,7 +104,7 @@ class TokenDatabaseTest extends DatabaseTestCase
$token = $this->tokens->findValidToken($this->createTokenHash(self::VALID_TOKEN));
$this->assertEquals($t, $token);
self::assertEquals($t, $token);
}
/**
......@@ -128,6 +128,6 @@ class TokenDatabaseTest extends DatabaseTestCase
$this->tokens->invalidateToken($this->createTokenHash(self::VALID_TOKEN));
$this->assertNull($this->tokens->findValidToken($this->createTokenHash(self::VALID_TOKEN)));
self::assertNull($this->tokens->findValidToken($this->createTokenHash(self::VALID_TOKEN)));
}
}
......@@ -46,14 +46,14 @@ class UserDatabaseTest extends DatabaseTestCase
{
$all = $this->users->search();
$this->assertEquals([], $all);
self::assertEquals([], $all);
$this->users->create(new User(0, '', '', '', 'email@email.com', null, null, null));
$this->users->create(new User(0, '', '', '', 'email2@email.com', null, null, null));
$all = $this->users->search();
$this->assertCount(2, $all);
self::assertCount(2, $all);
}
/**
......@@ -64,12 +64,12 @@ class UserDatabaseTest extends DatabaseTestCase
{
$user = $this->users->create($this->createUser());
$this->assertEquals($user, $this->users->get($user->getId()));
self::assertEquals($user, $this->users->get($user->getId()));
$user = $this->users->get($user->getId());
$this->assertEquals('doorcode', $user->getDoorcode()->getHash());
$this->assertEquals('password', $user->getPassword()->getHash());
self::assertEquals('doorcode', $user->getDoorcode()->getHash());
self::assertEquals('password', $user->getPassword()->getHash());
}
/**
......@@ -94,14 +94,14 @@ class UserDatabaseTest extends DatabaseTestCase