public function testExchangeWithInvalid() { $input = [10, 30, 20]; $this->setExpectedException(IndexOutOfBoundsException::class); Arr::exchange($input, 1, 99); }