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
8557d9d8
Commit
8557d9d8
authored
Dec 02, 2007
by
tamcy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#438: Updated test case
parent
baf77264
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
438TestCase.php
tests/Ticket/438TestCase.php
+6
-6
No files found.
tests/Ticket/438TestCase.php
View file @
8557d9d8
...
...
@@ -92,12 +92,12 @@ class Doctrine_Ticket_438_TestCase extends Doctrine_UnitTestCase
// 2. Fetch relationship in single query
$q
=
new
Doctrine_Query
();
$q
->
select
(
'sc.*, s.*, c.*'
)
$
coll
=
$
q
->
select
(
'sc.*, s.*, c.*'
)
->
from
(
'T438_StudentCourse sc, sc.Student s, sc.Course c'
)
->
where
(
'sc.student_id = ? AND sc.course_id = ?'
,
array
(
'07090002'
,
'MATH001'
))
->
execute
();
$record
=
$
q
->
getFirst
();
$record
=
$
coll
->
getFirst
();
$this
->
assertEqual
(
$record
->
student_id
,
'07090002'
);
$this
->
assertEqual
(
$record
->
course_id
,
'MATH001'
);
...
...
@@ -119,7 +119,7 @@ class T438_Student extends Doctrine_Record
public
function
setUp
()
{
$this
->
hasMany
(
'T438_Course as StudyCourses'
,
array
(
'refClass'
=>
'T438_StudentCourse'
,
'local'
=>
's
tudent_id'
,
'foreign'
=>
'
course_id'
));
$this
->
hasMany
(
'T438_Course as StudyCourses'
,
array
(
'refClass'
=>
'T438_StudentCourse'
,
'local'
=>
's
c_student_id'
,
'foreign'
=>
'sc_
course_id'
));
}
}
...
...
@@ -136,7 +136,7 @@ class T438_Course extends Doctrine_Record
public
function
setUp
()
{
$this
->
hasMany
(
'T438_Student as Students'
,
array
(
'refClass'
=>
'T438_StudentCourse'
,
'local'
=>
'
course_id'
,
'foreign'
=>
'
student_id'
));
$this
->
hasMany
(
'T438_Student as Students'
,
array
(
'refClass'
=>
'T438_StudentCourse'
,
'local'
=>
'
sc_course_id'
,
'foreign'
=>
'sc_
student_id'
));
}
}
...
...
@@ -153,7 +153,7 @@ class T438_StudentCourse extends Doctrine_Record
public
function
setUp
()
{
$this
->
hasOne
(
'T438_Student as Student'
,
array
(
'local'
=>
's
tudent_id'
,
'foreign'
=>
'
id'
));
$this
->
hasOne
(
'T438_Course as Course'
,
array
(
'local'
=>
'
course_id'
,
'foreign'
=>
'
id'
));
$this
->
hasOne
(
'T438_Student as Student'
,
array
(
'local'
=>
's
c_student_id'
,
'foreign'
=>
's_
id'
));
$this
->
hasOne
(
'T438_Course as Course'
,
array
(
'local'
=>
'
sc_course_id'
,
'foreign'
=>
'c_
id'
));
}
}
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