Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Tomáš Trávníček
doctrine-dbal
Commits
34f527ad
Commit
34f527ad
authored
Sep 30, 2007
by
jackbravo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some syntax errors on Doctrine Search
parent
01a3e063
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
Search.php
lib/Doctrine/Search.php
+1
-1
SearchTestCase.php
tests/SearchTestCase.php
+4
-4
No files found.
lib/Doctrine/Search.php
View file @
34f527ad
...
@@ -121,7 +121,7 @@ class Doctrine_Search
...
@@ -121,7 +121,7 @@ class Doctrine_Search
$conn
->
insert
(
$indexTableName
,
array
(
'keyword'
=>
$field
,
$conn
->
insert
(
$indexTableName
,
array
(
'keyword'
=>
$field
,
'position'
=>
$pos
,
'position'
=>
$pos
,
'field'
=>
$field
,
'field'
=>
$field
,
'foreign_id'
=>
$identifier
);
'foreign_id'
=>
$identifier
)
)
;
}
}
}
}
}
}
...
...
tests/SearchTestCase.php
View file @
34f527ad
...
@@ -70,7 +70,7 @@ class Doctrine_Search_TestCase extends Doctrine_UnitTestCase
...
@@ -70,7 +70,7 @@ class Doctrine_Search_TestCase extends Doctrine_UnitTestCase
->
innerJoin
(
't.SearchTestIndex i'
)
->
innerJoin
(
't.SearchTestIndex i'
)
->
where
(
'i.keyword = ?'
);
->
where
(
'i.keyword = ?'
);
$array
=
$q
->
execute
(
array
(
'orm'
),
Doctrine
_Hydrate
::
HYDRATE_ARRAY
);
$array
=
$q
->
execute
(
array
(
'orm'
),
Doctrine
::
HYDRATE_ARRAY
);
$this
->
assertEqual
(
$array
[
0
][
'title'
],
'Once there was an ORM framework'
);
$this
->
assertEqual
(
$array
[
0
][
'title'
],
'Once there was an ORM framework'
);
}
}
...
@@ -84,7 +84,7 @@ class Doctrine_Search_TestCase extends Doctrine_UnitTestCase
...
@@ -84,7 +84,7 @@ class Doctrine_Search_TestCase extends Doctrine_UnitTestCase
->
innerJoin
(
't.SearchTestIndex i'
)
->
innerJoin
(
't.SearchTestIndex i'
)
->
where
(
'i.keyword = ? OR i.keyword = ?'
);
->
where
(
'i.keyword = ? OR i.keyword = ?'
);
$array
=
$q
->
execute
(
array
(
'orm'
,
'framework'
),
Doctrine
_Hydrate
::
HYDRATE_ARRAY
);
$array
=
$q
->
execute
(
array
(
'orm'
,
'framework'
),
Doctrine
::
HYDRATE_ARRAY
);
$this
->
assertEqual
(
$array
[
0
][
'title'
],
'Once there was an ORM framework'
);
$this
->
assertEqual
(
$array
[
0
][
'title'
],
'Once there was an ORM framework'
);
}
}
...
@@ -98,7 +98,7 @@ class Doctrine_Search_TestCase extends Doctrine_UnitTestCase
...
@@ -98,7 +98,7 @@ class Doctrine_Search_TestCase extends Doctrine_UnitTestCase
->
innerJoin
(
't.SearchTestIndex i'
)
->
innerJoin
(
't.SearchTestIndex i'
)
->
where
(
'i.keyword = ?'
);
->
where
(
'i.keyword = ?'
);
$array
=
$q
->
execute
(
array
(
'was'
),
Doctrine
_Hydrate
::
HYDRATE_ARRAY
);
$array
=
$q
->
execute
(
array
(
'was'
),
Doctrine
::
HYDRATE_ARRAY
);
$this
->
assertEqual
(
count
(
$array
),
0
);
$this
->
assertEqual
(
count
(
$array
),
0
);
}
}
...
@@ -112,7 +112,7 @@ class Doctrine_Search_TestCase extends Doctrine_UnitTestCase
...
@@ -112,7 +112,7 @@ class Doctrine_Search_TestCase extends Doctrine_UnitTestCase
->
innerJoin
(
't.SearchTestIndex i'
)
->
innerJoin
(
't.SearchTestIndex i'
)
->
where
(
'i.keyword = ?'
);
->
where
(
'i.keyword = ?'
);
$array
=
$q
->
execute
(
array
(
'someunknownword'
),
Doctrine
_Hydrate
::
HYDRATE_ARRAY
);
$array
=
$q
->
execute
(
array
(
'someunknownword'
),
Doctrine
::
HYDRATE_ARRAY
);
$this
->
assertEqual
(
count
(
$array
),
0
);
$this
->
assertEqual
(
count
(
$array
),
0
);
}
}
...
...
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