Skip to content

Commit

Permalink
Fixed cookie test
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Chernyi committed Mar 2, 2018
1 parent 65a1f0f commit 5c30e24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/Auth/Storage/CookieTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function testGetUserNull(): void

public function testGetUser(): void
{
$cookie = $this->app->getContainer()->auth->login('login', 'me');
$cookie = \Dflydev\FigCookies\Cookie::create('user_id', 1);
$request = $this->app->getContainer()['request'];
unset($this->app->getContainer()['request']);
$this->app->getContainer()['request'] = \Dflydev\FigCookies\FigRequestCookies::set($request, $cookie);
Expand Down
4 changes: 2 additions & 2 deletions tests/data/dummy/Dummy.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ public function has($where)
{
if (
('login' === array_keys($where)[0] && 'login' === $where['login'])
|| ('id' === array_keys($where)[0] && 1 === $where['id'])
|| ('id' === array_keys($where)[0] && '1' === $where['id'])
) {
return true;
}

throw new \Exception('test exception with not existing field');
return false;
}
}

0 comments on commit 5c30e24

Please sign in to comment.