public function setReturnURL($returnURL) { if ($returnURL !== null && !filter_var($returnURL, FILTER_VALIDATE_URL)) { throw new \UnexpectedValueException('URL de retorno inválida'); } $this->returnURL = $returnURL; }
/** * @test */ public function setReturnURLThrowsUnexpectedValue() { $this->setExpectedException(\UnexpectedValueException::class); $this->transaction->setReturnURL(null); }