Skip to content

Commit 4ffc9be

Browse files
committed
Change unittests for #202
1 parent 470d121 commit 4ffc9be

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

tests/MysqlRelationsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function testMysqlRelations()
4545
$user = MysqlUser::find($user->id); // refetch
4646
$this->assertEquals('admin', $user->role->type);
4747

48-
// MongoDB beelongs to
48+
// MongoDB belongs to
4949
$role = $user->role()->first(); // refetch
5050
$this->assertEquals('John Doe', $role->mysqlUser->name);
5151

tests/models/MysqlRole.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function user()
1616

1717
public function mysqlUser()
1818
{
19-
return $this->belongsTo('MysqlUser', 'role_id');
19+
return $this->belongsTo('MysqlUser');
2020
}
2121

2222
/**

tests/models/MysqlUser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function books()
1616

1717
public function role()
1818
{
19-
return $this->hasOne('Role', 'role_id');
19+
return $this->hasOne('Role');
2020
}
2121

2222
/**

tests/models/Role.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function user()
1414

1515
public function mysqlUser()
1616
{
17-
return $this->belongsTo('MysqlUser', 'role_id');
17+
return $this->belongsTo('MysqlUser');
1818
}
1919

2020
}

0 commit comments

Comments
 (0)