Commit c62abc99 authored by meus's avatar meus

added a stub to test the methods that throw exceptions in order to get 100% coverage

parent b040bbe3
...@@ -147,4 +147,45 @@ class Orm_Component_AccessTest extends Doctrine_OrmTestCase ...@@ -147,4 +147,45 @@ class Orm_Component_AccessTest extends Doctrine_OrmTestCase
} }
/**
* @test
* @expectedException Doctrine_Exception
*/
public function shouldNotBeAbleToUseContainsWhenNotImplemented()
{
$stub = new AccessStub();
isset($stub['foo']);
}
/**
* @test
* @expectedException Doctrine_Exception
*/
public function shouldNotBeAbleToUseSetWhenNotImplemented()
{
$stub = new AccessStub();
$stub['foo'] = 'foo';
}
/**
* @test
* @expectedException Doctrine_Exception
*/
public function shouldNotBeAbleToUseUnsetWhenNotImplemented()
{
$stub = new AccessStub();
unset($stub['foo']);
}
/**
* @test
* @expectedException Doctrine_Exception
*/
public function shouldNotBeAbleToUseGetWhenNotImplemented()
{
$stub = new AccessStub();
$stub['foo'];
}
} }
class AccessStub extends Doctrine_Access {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment