private function run() { $this->type->validate(); $this->initPayment(); $this->initTerm(); $this->type->validateSign($this->term->secret); $this->type->validateTermEnabled($this->term->mode); $this->initCity(); $this->initFee(); $this->payment->doProcess(); }
/** * @param array $input * @param int $code * @param string $message * * @return void * * @dataProvider check */ public function testCheck($input, $code = null, $message = null) { Secure::sign($input, 'check', 'secret'); $opType = new Type('check', $input); try { $this->assertTrue($opType->validate()); if ($code) { $this->assertFalse(true, 'Exception must be there with code ' . $code); } } catch (ProcessorException $e) { $this->assertEquals($code, $e->getCode(), $e->getMessage()); $this->assertContains($message, $e->getMessage()); } }