Skip to content

Commit 7d2468b

Browse files
committed
Adding test for issue #62
1 parent bc4ae52 commit 7d2468b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

phpunit.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,9 @@
2727
<directory>tests/QueryBuilderTest.php</directory>
2828
<directory>tests/QueryTest.php</directory>
2929
</testsuite>
30+
<testsuite name="model">
31+
<directory>tests/ModelTest.php</directory>
32+
<directory>tests/RelationsTest.php</directory>
33+
</testsuite>
3034
</testsuites>
3135
</phpunit>

tests/ModelTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ public function testUpdate()
6363

6464
$this->assertEquals('John Doe', $check->name);
6565
$this->assertEquals(36, $check->age);
66+
67+
$user->update(array('age' => 20));
68+
69+
$check = User::find($user->_id);
70+
$this->assertEquals(20, $check->age);
6671
}
6772

6873
public function testDelete()

0 commit comments

Comments
 (0)