/** * @test * * @expectedException \Payum\Core\Exception\RuntimeException * @expectedExceptionMessage The return must be set either to FormRequest or to options. */ public function throwIfReturnUrlNeitherSetToFormRequestNorToOptions() { $api = new Api(array('username' => 'a_username', 'password' => 'a_password', 'signature' => 'a_signature', 'business' => 'a_business', 'sandbox' => true), $this->createHttpClientMock(), $this->createHttpMessageFactory()); $api->doCreateButton([]); }