Changeset 3777 for trunk/tests/Orm

Show
Ignore:
Timestamp:
02/14/08 21:14:47 (11 months ago)
Author:
meus
Message:

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

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tests/Orm/Component/AccessTest.php

    r3776 r3777  
    148148    } 
    149149 
     150    /** 
     151     * @test 
     152     * @expectedException Doctrine_Exception 
     153     */ 
     154     public function shouldNotBeAbleToUseContainsWhenNotImplemented() 
     155     { 
     156         $stub = new AccessStub(); 
     157         isset($stub['foo']); 
     158     } 
     159 
     160    /** 
     161     * @test 
     162     * @expectedException Doctrine_Exception 
     163     */ 
     164     public function shouldNotBeAbleToUseSetWhenNotImplemented() 
     165     { 
     166         $stub = new AccessStub(); 
     167         $stub['foo']  = 'foo'; 
     168     } 
     169 
     170    /** 
     171     * @test 
     172     * @expectedException Doctrine_Exception 
     173     */ 
     174     public function shouldNotBeAbleToUseUnsetWhenNotImplemented() 
     175     { 
     176         $stub = new AccessStub(); 
     177         unset($stub['foo']); 
     178     } 
     179 
     180    /** 
     181     * @test 
     182     * @expectedException Doctrine_Exception 
     183     */ 
     184     public function shouldNotBeAbleToUseGetWhenNotImplemented() 
     185     { 
     186         $stub = new AccessStub(); 
     187         $stub['foo']; 
     188     } 
    150189} 
     190 
     191class AccessStub extends Doctrine_Access {}