Fix isset for models/records

This commit is contained in:
Gregory Oschwald
2013-12-02 10:02:37 -08:00
parent 0bed941634
commit fbbe2dba24
3 changed files with 43 additions and 4 deletions
+16
View File
@@ -190,4 +190,20 @@ class CountryTest extends \PHPUnit_Framework_TestCase
'json_encode can be called on the record object directly'
);
}
public function testIsSet()
{
$this->assertTrue(isset($this->model->traits), 'traits is set');
$this->assertFalse(isset($this->model->unknown), 'unknown is not set');
$this->assertTrue(
isset($this->model->traits->ipAddress),
'ip_address is set'
);
$this->assertFalse(
isset($this->model->traits->unknown),
'unknown trait is not set'
);
}
}