function testNotificationMissingPasswordThrows() { $postData = $this->schemaNotification('payment_notification.json'); Config::set('username', '', Config::ENV_SANDBOX); $this->assertEqual('', Config::getPassword()); try { Payment::notification($postData); $this->fail('Errors\\ArgumentError expected!'); } catch (Errors\ArgumentError $exe) { $this->assertEqual('password is not configured! See Hypercharge\\Config::set()', $exe->getMessage()); return; } catch (Exception $exe) { $this->fail('unexpected Exception: ' . $exe->toString()); } }