Skip to content

Commit 268c3be

Browse files
committed
Add test for #471
1 parent d188377 commit 268c3be

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tests/RelationsTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ public function testBelongsTo()
5050

5151
$owner = $item->user;
5252
$this->assertEquals('John Doe', $owner->name);
53+
54+
$book = Book::create(['title' => 'A Clash of Kings']);
55+
$this->assertEquals(null, $book->author);
5356
}
5457

5558
public function testHasOne()

tests/config/database.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
'mongodb' => [
88
'name' => 'mongodb',
99
'driver' => 'mongodb',
10-
'host' => 'localhost',
10+
'host' => '127.0.0.1',
1111
'database' => 'unittest',
1212
],
1313

1414
'mysql' => [
1515
'driver' => 'mysql',
16-
'host' => 'localhost',
16+
'host' => '127.0.0.1',
1717
'database' => 'unittest',
1818
'username' => 'travis',
1919
'password' => '',

0 commit comments

Comments
 (0)