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
b868e91f
Commit
b868e91f
authored
Dec 03, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed test break.
parent
b0568612
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ActiveRecordTestTrait.php
tests/unit/framework/ar/ActiveRecordTestTrait.php
+0
-4
ActiveRecordTest.php
tests/unit/framework/db/ActiveRecordTest.php
+4
-0
No files found.
tests/unit/framework/ar/ActiveRecordTestTrait.php
View file @
b868e91f
...
...
@@ -411,10 +411,6 @@ trait ActiveRecordTestTrait
$this
->
assertTrue
(
$customer
->
isRelationPopulated
(
'orders'
));
$this
->
assertEquals
(
1
,
count
(
$customer
->
orders
));
$this
->
assertEquals
(
1
,
count
(
$customer
->
populatedRelations
));
// https://github.com/yiisoft/yii2/issues/1402
$orders
=
$this
->
callOrderFind
()
->
with
(
'books'
)
->
asArray
()
->
all
();
$this
->
assertEquals
(
3
,
count
(
$orders
));
}
public
function
testFindLazyVia
()
...
...
tests/unit/framework/db/ActiveRecordTest.php
View file @
b868e91f
...
...
@@ -105,6 +105,10 @@ class ActiveRecordTest extends DatabaseTestCase
$orders
=
Order
::
find
()
->
with
(
'books'
)
->
orderBy
(
'id'
)
->
all
();
$this
->
assertEquals
(
3
,
count
(
$orders
));
// https://github.com/yiisoft/yii2/issues/1402
$orders
=
Order
::
find
()
->
with
(
'books'
)
->
orderBy
(
'id'
)
->
asArray
()
->
all
();
$this
->
assertEquals
(
3
,
count
(
$orders
));
$order
=
$orders
[
0
];
$this
->
assertEquals
(
1
,
$order
->
id
);
$this
->
assertEquals
(
2
,
count
(
$order
->
books
));
...
...
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