Example #1
0
 /**
  * This method tests that a exception is thrown if the
  * object with the key, passed to the remove method as
  * a parameter, does not exist in the TreeMap.
  *
  * @return void
  */
 public function testDeleteWithException()
 {
     $this->setExpectedException('\\AppserverIo\\Collections\\IndexOutOfBoundsException');
     // initialize a new TreeMap
     $map = new TreeMap();
     // try to remove a not existing object from the TreeMap
     $map->remove(1);
     $this->fail('Expected exception IndexOutOfBoundsException is not thrown');
 }