예제 #1
0
 /**
  * @covers \PHP\Manipulator\TokenContainer::<protected>
  * @covers \PHP\Manipulator\TokenContainer::offsetGet
  * @covers \Exception
  */
 public function testOffsetGetOnNotExistingOffsetThrowsException()
 {
     $container = new TokenContainer();
     try {
         $container->offsetGet(5);
         $this->fail('Expected exception not thrown');
     } catch (\Exception $e) {
         $this->assertEquals("Offset '5' does not exist", $e->getMessage(), 'Wrong exception message');
     }
 }