Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-mongodb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
laravel-mongodb
Commits
59b4fb84
Commit
59b4fb84
authored
Jan 11, 2015
by
duxet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
There is no support for query caching in L5 => removing CacheTest
parent
698e166b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
30 deletions
+0
-30
CacheTest.php
tests/CacheTest.php
+0
-30
No files found.
tests/CacheTest.php
deleted
100644 → 0
View file @
698e166b
<?php
class
CacheTest
extends
TestCase
{
public
function
tearDown
()
{
User
::
truncate
();
Cache
::
forget
(
'db.users'
);
}
public
function
testCache
()
{
User
::
create
(
array
(
'name'
=>
'John Doe'
,
'age'
=>
35
,
'title'
=>
'admin'
));
User
::
create
(
array
(
'name'
=>
'Jane Doe'
,
'age'
=>
33
,
'title'
=>
'admin'
));
User
::
create
(
array
(
'name'
=>
'Harry Hoe'
,
'age'
=>
13
,
'title'
=>
'user'
));
$users
=
DB
::
collection
(
'users'
)
->
where
(
'age'
,
'>'
,
10
)
->
remember
(
10
)
->
get
();
$this
->
assertEquals
(
3
,
count
(
$users
));
$users
=
DB
::
collection
(
'users'
)
->
where
(
'age'
,
'>'
,
10
)
->
getCached
();
$this
->
assertEquals
(
3
,
count
(
$users
));
$users
=
User
::
where
(
'age'
,
'>'
,
10
)
->
remember
(
10
,
'db.users'
)
->
get
();
$this
->
assertEquals
(
3
,
count
(
$users
));
$users
=
Cache
::
get
(
'db.users'
);
$this
->
assertEquals
(
3
,
count
(
$users
));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment