Skip to content

Commit

Permalink
Tweak factory setup.
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Apr 9, 2019
1 parent 6303f86 commit 69eb902
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions tests/Feature/PersistentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ public function it_can_persist_between_request()

$different = User::find($user->getKey());

$this->assertEquals($user->cabinet('now')->toDateTimeString(), $lastRead);
$this->assertNotEquals($different->cabinet('now')->toDateTimeString(), $lastRead);
$this->assertEquals($different->cabinet('last_read'), $lastRead);

$tags = [
Expand Down
4 changes: 2 additions & 2 deletions tests/Stubs/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ protected function onCabinet(Repository $cabinet)
$cabinet->setStorage(resolve('cache.store'))
->register('now', function ($user) {
return Carbon::now('Asia/Kuala_Lumpur');
})->forever('last_read', function ($user) use ($cabinet) {
return $cabinet->get('now')->toDateTimeString();
})->forever('last_read', function ($user) {
return Carbon::now('Asia/Kuala_Lumpur')->toDateTimeString();
});
}
}

0 comments on commit 69eb902

Please sign in to comment.