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
cab7c8ea
Commit
cab7c8ea
authored
Jun 05, 2007
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New test case for one-one relation fetching.
parent
1e2b0bf6
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
244 additions
and
220 deletions
+244
-220
CustomResultSetOrderTestCase.php
tests/CustomResultSetOrderTestCase.php
+2
-3
EventListenerTestCase.php
tests/EventListenerTestCase.php
+213
-213
classes.php
tests/classes.php
+28
-3
run.php
tests/run.php
+1
-1
No files found.
tests/CustomResultSetOrderTestCase.php
View file @
cab7c8ea
...
...
@@ -158,13 +158,12 @@ class Doctrine_CustomResultSetOrder_TestCase extends Doctrine_UnitTestCase {
switch
(
$category
->
name
)
{
case
'First'
:
// The first category should have 3 boards, right?
// It has only 1! The other two slipped to the 2nd category!
// The first category should have 3 boards
$this
->
assertEqual
(
3
,
$category
->
Boards
->
count
());
break
;
case
'Second'
:
// The second category should have 1 board
, but it got 3 now
// The second category should have 1 board
$this
->
assertEqual
(
1
,
$category
->
Boards
->
count
());
break
;
...
...
tests/EventListenerTestCase.php
View file @
cab7c8ea
This diff is collapsed.
Click to expand it.
tests/classes.php
View file @
cab7c8ea
...
...
@@ -695,9 +695,9 @@ class QueryTest_Entry extends Doctrine_Record
*/
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'authorId
as authorId
'
,
'integer'
,
4
,
$this
->
hasColumn
(
'authorId'
,
'integer'
,
4
,
array
(
'notnull'
));
$this
->
hasColumn
(
'date
as date
'
,
'integer'
,
4
,
$this
->
hasColumn
(
'date'
,
'integer'
,
4
,
array
(
'notnull'
));
}
...
...
@@ -716,7 +716,32 @@ class QueryTest_User extends Doctrine_Record
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'username as username'
,
'string'
,
50
,
array
(
'notnull'
,
'unique'
));
array
(
'notnull'
));
$this
->
hasColumn
(
'visibleRankId'
,
'integer'
,
4
);
}
/**
* Runtime definition of the relationships to other entities.
*/
public
function
setUp
()
{
$this
->
hasOne
(
'QueryTest_Rank as visibleRank'
,
'QueryTest_User.visibleRankId'
);
}
}
class
QueryTest_Rank
extends
Doctrine_Record
{
/**
* Initializes the table definition.
*/
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'title as title'
,
'string'
,
100
,
array
(
'notnull'
));
$this
->
hasColumn
(
'color as color'
,
'string'
,
20
,
array
(
'notnull'
,
'regexp'
=>
'/^[a-zA-Z\-]{3,}|#[0-9a-fA-F]{6}$/D'
));
$this
->
hasColumn
(
'icon as icon'
,
'string'
,
50
,
array
(
'notnull'
,
'default'
=>
' '
,
'regexp'
=>
'/^[a-zA-Z0-9_\-]+\.(jpg|gif|png)$/D'
));
}
}
...
...
tests/run.php
View file @
cab7c8ea
...
...
@@ -222,7 +222,7 @@ $test->addTestCase(new Doctrine_ColumnAggregationInheritance_TestCase());
$test
->
addTestCase
(
new
Doctrine_ColumnAlias_TestCase
());
$test
->
addTestCase
(
new
Doctrine_Query_OneToOneFetching_TestCase
());
$test
->
addTestCase
(
new
Doctrine_Cache_Apc_TestCase
());
$test
->
addTestCase
(
new
Doctrine_Cache_Memcache_TestCase
());
...
...
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