1
0
mirror of synced 2025-01-31 04:21:44 +03:00

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

This commit is contained in:
meus 2008-02-14 21:14:47 +00:00
parent b040bbe35d
commit c62abc99c4

View File

@ -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 {}