/** * @param $key * * @return mixed * @throws TypeException when the $key is not the correct type. */ function remove($key) { $this->avl->remove(new Pair($key, null)); }
function testRemoveNonExistent() { $tree = new SplayTree(); $tree->remove(0); $tree->add(1); $tree->remove(0); $this->assertCount(1, $tree); $this->assertFalse($tree->isEmpty()); }