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
ec8f446f
Commit
ec8f446f
authored
Oct 18, 2006
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #175
parent
c1280d31
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
11 deletions
+8
-11
Collection.php
lib/Doctrine/Collection.php
+1
-2
CollectionOffsetTestCase.php
tests/CollectionOffsetTestCase.php
+1
-1
QueryTestCase.php
tests/QueryTestCase.php
+2
-7
run.php
tests/run.php
+4
-1
No files found.
lib/Doctrine/Collection.php
View file @
ec8f446f
...
...
@@ -500,9 +500,8 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator
if
(
isset
(
$this
->
reference_field
))
$record
->
set
(
$this
->
reference_field
,
$this
->
reference
,
false
);
if
(
in_array
(
$record
,
$this
->
data
))
{
if
(
array_search
(
$record
,
$this
->
data
)
!==
false
)
return
false
;
}
if
(
isset
(
$key
))
{
if
(
isset
(
$this
->
data
[
$key
]))
...
...
tests/CollectionOffsetTestCase.php
View file @
ec8f446f
<?php
class
Doctrine_Collection_OffsetTestCase
extends
Doctrine_UnitTestCase
{
class
Doctrine_Collection_Offset
_
TestCase
extends
Doctrine_UnitTestCase
{
public
function
testExpand
()
{
$users
=
$this
->
connection
->
query
(
"FROM User-o"
);
...
...
tests/QueryTestCase.php
View file @
ec8f446f
...
...
@@ -986,15 +986,10 @@ class Doctrine_Query_TestCase extends Doctrine_UnitTestCase {
$this
->
assertTrue
(
$query
instanceof
Doctrine_Query
);
$this
->
assertEqual
(
$query
->
get
(
"offset"
),
5
);
$query
->
offset
=
7
;
$this
->
assertEqual
(
$query
->
get
(
"offset"
),
7
);
$query
->
limit
=
10
;
$this
->
assertEqual
(
$query
->
limit
,
10
);
$this
->
assertTrue
(
strpos
(
$query
->
getQuery
(),
"LIMIT"
));
$query
->
remove
(
'limit'
)
->
remove
(
'offset'
);
$this
->
assertFalse
(
strpos
(
$query
->
getQuery
(),
"OFFSET"
));
$this
->
assertFalse
(
strpos
(
$query
->
getQuery
(),
"LIMIT"
));
$coll
=
$query
->
execute
();
...
...
tests/run.php
View file @
ec8f446f
...
...
@@ -39,6 +39,7 @@ require_once("QueryComponentAliasTestCase.php");
require_once
(
"QuerySubqueryTestCase.php"
);
require_once
(
"QuerySelectTestCase.php"
);
require_once
(
"QueryDeleteTestCase.php"
);
require_once
(
"QueryUpdateTestCase.php"
);
require_once
(
"DBTestCase.php"
);
require_once
(
"SchemaTestCase.php"
);
...
...
@@ -81,7 +82,7 @@ $test->addTestCase(new Doctrine_BatchIteratorTestCase());
$test
->
addTestCase
(
new
Doctrine_ConfigurableTestCase
());
$test
->
addTestCase
(
new
Doctrine_Collection_Offset
TestCase
());
//$test->addTestCase(new Doctrine_Collection_Offset_
TestCase());
$test
->
addTestCase
(
new
Doctrine_PessimisticLockingTestCase
());
...
...
@@ -135,6 +136,8 @@ $test->addTestCase(new Doctrine_Query_Select_TestCase());
$test
->
addTestCase
(
new
Doctrine_Query_Delete_TestCase
());
$test
->
addTestCase
(
new
Doctrine_Query_Update_TestCase
());
//$test->addTestCase(new Doctrine_Cache_FileTestCase());
//$test->addTestCase(new Doctrine_Cache_SqliteTestCase());
...
...
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