Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
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
PSDI Army
yii2
Commits
db6d0a57
Commit
db6d0a57
authored
Feb 12, 2014
by
Paul Klimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unit test for yii\sphinx\Query::count() added.
parent
be2b76d4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
QueryTest.php
tests/unit/extensions/sphinx/QueryTest.php
+12
-0
No files found.
tests/unit/extensions/sphinx/QueryTest.php
View file @
db6d0a57
...
@@ -184,4 +184,15 @@ class QueryTest extends SphinxTestCase
...
@@ -184,4 +184,15 @@ class QueryTest extends SphinxTestCase
$this
->
assertContains
(
$snippetOptions
[
'before_match'
]
.
$match
,
$row
[
'snippet'
]
.
$snippetOptions
[
'after_match'
],
'Options not applied!'
);
$this
->
assertContains
(
$snippetOptions
[
'before_match'
]
.
$match
,
$row
[
'snippet'
]
.
$snippetOptions
[
'after_match'
],
'Options not applied!'
);
}
}
}
}
public
function
testCount
()
{
$connection
=
$this
->
getConnection
();
$query
=
new
Query
;
$count
=
$query
->
from
(
'yii2_test_article_index'
)
->
match
(
'about'
)
->
count
(
'*'
,
$connection
);
$this
->
assertEquals
(
2
,
$count
);
}
}
}
\ No newline at end of file
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