/** * Test provide OutOfRangeException thrown as exception * * @expectedException OutOfRangeException */ public function testOORException() { // remove with following reindex $this->bread->remove(0, true); $this->assertEquals(1, $this->bread->num_of_segments()); // basic remove $this->bread->remove(0); $this->assertEquals(0, $this->bread->num_of_segments()); // refer to non existent element $this->bread->segment(10); }