Skip to content

Commit

Permalink
Increase test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jenssegers committed Apr 27, 2014
1 parent 2b4a483 commit 69ac793
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Jenssegers/Model/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ protected static function boot()
* Fill the model with an array of attributes.
*
* @param array $attributes
* @return \Illuminate\Database\Eloquent\Model
* @return \Jenssegers\Model\Model
*/
public function fill(array $attributes)
{
Expand All @@ -136,7 +136,7 @@ public function fill(array $attributes)
*
* @param array $attributes
* @param bool $exists
* @return \Illuminate\Database\Eloquent\Model
* @return \Jenssegers\Model\Model
*/
public function newInstance($attributes = array(), $exists = false)
{
Expand Down
7 changes: 7 additions & 0 deletions tests/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,17 @@ public function testAttributeManipulation()
{
$model = new ModelStub;
$model->name = 'foo';

$this->assertEquals('foo', $model->name);
$this->assertTrue(isset($model->name));
unset($model->name);
$this->assertEquals(null, $model->name);
$this->assertFalse(isset($model->name));

$model['name'] = 'foo';
$this->assertTrue(isset($model['name']));
unset($model['name']);
$this->assertFalse(isset($model['name']));
}

public function testConstructor()
Expand Down

0 comments on commit 69ac793

Please sign in to comment.