public function tearDown() { TestingGenericAdapter::$acceptedCurrencies = array(); TestingGenericAdapter::$fakeGlobals = array(); TestingGenericAdapter::$fakeIdentifier = false; parent::tearDown(); }
/** * @covers DataValidator::validate_gateway */ public function testBadGatewayError() { $badGateway = uniqid(); // The gateway is calculated from adapter class, so this validation // doesn't happen in practice and we can't fake a bad gateway using // GatewayAdapter::addRequestData(). TestingGenericAdapter::$fakeIdentifier = $badGateway; $this->adapter = new TestingGenericAdapter(); $this->page->adapter = $this->adapter; $this->page->validateForm(); $this->assertFalse($this->adapter->validatedOK()); $errors = $this->adapter->getValidationErrors(); $this->assertArrayHasKey('general', $errors); }