Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-mongodb
Project
Project
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
sinan
laravel-mongodb
Commits
4ffc9be9
Commit
4ffc9be9
authored
May 03, 2014
by
Jens Segers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change unittests for #202
parent
470d121b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
MysqlRelationsTest.php
tests/MysqlRelationsTest.php
+1
-1
MysqlRole.php
tests/models/MysqlRole.php
+1
-1
MysqlUser.php
tests/models/MysqlUser.php
+1
-1
Role.php
tests/models/Role.php
+1
-1
No files found.
tests/MysqlRelationsTest.php
View file @
4ffc9be9
...
...
@@ -45,7 +45,7 @@ class MysqlRelationsTest extends TestCase {
$user
=
MysqlUser
::
find
(
$user
->
id
);
// refetch
$this
->
assertEquals
(
'admin'
,
$user
->
role
->
type
);
// MongoDB be
e
longs to
// MongoDB belongs to
$role
=
$user
->
role
()
->
first
();
// refetch
$this
->
assertEquals
(
'John Doe'
,
$role
->
mysqlUser
->
name
);
...
...
tests/models/MysqlRole.php
View file @
4ffc9be9
...
...
@@ -16,7 +16,7 @@ class MysqlRole extends Eloquent {
public
function
mysqlUser
()
{
return
$this
->
belongsTo
(
'MysqlUser'
,
'role_id'
);
return
$this
->
belongsTo
(
'MysqlUser'
);
}
/**
...
...
tests/models/MysqlUser.php
View file @
4ffc9be9
...
...
@@ -16,7 +16,7 @@ class MysqlUser extends Eloquent {
public
function
role
()
{
return
$this
->
hasOne
(
'Role'
,
'role_id'
);
return
$this
->
hasOne
(
'Role'
);
}
/**
...
...
tests/models/Role.php
View file @
4ffc9be9
...
...
@@ -14,7 +14,7 @@ class Role extends Eloquent {
public
function
mysqlUser
()
{
return
$this
->
belongsTo
(
'MysqlUser'
,
'role_id'
);
return
$this
->
belongsTo
(
'MysqlUser'
);
}
}
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