Added tests for accessing unknown attributes

This commit is contained in:
Gregory Oschwald 2013-12-02 19:26:20 -08:00
parent a29e43bad4
commit 8bd00943f4

View File

@ -204,6 +204,23 @@ class CountryTest extends \PHPUnit_Framework_TestCase
isset($this->model->traits->unknown),
'unknown trait is not set'
);
}
/**
* @expectedException RuntimeException
* @expectedExceptionMessage Unknown attribute
*/
public function testUnknownRecord()
{
$this->model->unknownRecord;
}
/**
* @expectedException RuntimeException
* @expectedExceptionMessage Unknown attribute
*/
public function testUnknownTrait()
{
$this->model->traits->unknown;
}
}