Fix remaining typos

This commit is contained in:
Belle Aerni committed 2022-11-01 18:53:36 -07:00
1 parent 10944467a8
commit 6d557ce39c
67 files changed
+217 -143

No files matched your search

+77 -3
View File
@@ -27,7 +27,9 @@
"Nyan",
"recognised",
"fordnox",
"Dockerized"
"Dockerized",
"proccess",
"unsuspended"
],
"ignoreWords": [
@@ -222,7 +224,78 @@
"LSWS",
"Lighttpd",
"mbstring",
"srcset"
"srcset",
"gugl",
"cclogin",
"CURDATE",
"BOXCLR",
"vatnum",
"caid",
"ECB's",
"onkeyup",
"DYSY",
"uninstallation",
"TRANSLIT",
"taxtitle",
"upgradables",
"sdbname",
"srepo",
"cgroups",
"Prio",
"longblob",
"loginform",
"closethick",
"allowtransparency",
"tabindex",
"Betransferred",
"Firstname",
"Lastname",
"pids",
"BOXADMR",
"lsql",
"rarr",
"randnum",
"classname",
"drepo",
"blud",
"onbeforeunload",
"colorpick",
"clickout",
"typeof",
"signin",
"helpdesks",
"hostnames",
"Askimet",
"urlset",
"lastmod",
"changefreq",
"remoteip",
"timespan",
"yeste",
"Flot",
"messageid",
"eunion",
"Roboto",
"onchange",
"enctype",
"endtrans",
"srch",
"behaviour",
"xaxis",
"yaxis",
"susp",
"cancelation",
"inps",
"ptitle",
"PLUGINNAME",
"nody",
"Perds",
"prms",
"apikey",
"tailwindcss",
"flexbox",
"juoda",
"BOXSID"
],
"ignorePaths": [
"tests/**",
@@ -261,6 +334,7 @@
"src/bb-modules/Orderbutton/html_client/mod_orderbutton_js.html.twig",
"src/bb-modules/Massmailer/Api/Admin.php",
"src/bb-modules/System/html_admin/mod_system_settings.html.twig",
"gulpfile.babel.js"
"gulpfile.babel.js",
"htaccess.txt"
]
}
+1 -1
View File
@@ -56,7 +56,7 @@ abstract class Payment_AdapterAbstract
$this->_config = $config;
/**
* Redirect client after successfull payment, usually to invoice
* Redirect client after successful payment, usually to invoice
*/
if(!$this->getParam('return_url')) {
throw new Payment_Exception('Return URL for payment gateway was not set', array(), 6001);
+3 -3
View File
@@ -34,7 +34,7 @@ class Registrar_Adapter_Custom extends Registrar_AdapterAbstract
);
}
public function isDomainCanBeTransfered(Registrar_Domain $domain)
public function isDomainCanBetransferred(Registrar_Domain $domain)
{
$this->getLog()->debug('Checking if domain can be transferred: ' . $domain->getName());
return true;
@@ -563,7 +563,7 @@ class Whois {
*/
private function get_tld()
{
// Splitting domainname
// Splitting domain name
$domain=explode(".",$this->domain);
if(count($domain)>2) {
@@ -606,7 +606,7 @@ class Whois {
*/
private function get_domain()
{
// Splitting domainname
// Splitting domain name
$domain=explode(".",$this->domain);
return $domain[0];
}
+3 -3
View File
@@ -69,7 +69,7 @@ class Registrar_Adapter_Email extends Registrar_AdapterAbstract
throw new Registrar_Exception('Email registrar can not determine whether domain is available');
}
public function isDomainCanBeTransfered(Registrar_Domain $domain)
public function isDomainCanBetransferred(Registrar_Domain $domain)
{
throw new Registrar_Exception('Email registrar can not determine whether domain can be transferred');
}
@@ -619,7 +619,7 @@ class Whois2 {
*/
private function get_tld()
{
// Splitting domainname
// Splitting domain name
$domain=explode(".",$this->domain);
if(count($domain)>2) {
@@ -662,7 +662,7 @@ class Whois2 {
*/
private function get_domain()
{
// Splitting domainname
// Splitting domain name
$domain=explode(".",$this->domain);
return $domain[0];
}
@@ -72,7 +72,7 @@ class Registrar_Adapter_Internetbs extends Registrar_AdapterAbstract
return ($result['status'] == 'AVAILABLE');
}
public function isDomainCanBeTransfered(Registrar_Domain $domain)
public function isDomainCanBetransferred(Registrar_Domain $domain)
{
throw new Registrar_Exception('Domain transfer checking is not implemented');
}
@@ -119,7 +119,7 @@ class Registrar_Adapter_Resellerclub extends Registrar_AdapterAbstract
return false;
}
public function isDomainCanBeTransfered(Registrar_Domain $domain)
public function isDomainCanBetransferred(Registrar_Domain $domain)
{
$params = array(
'domain-name' => $domain->getName(),
+1 -1
View File
@@ -37,7 +37,7 @@ abstract class Registrar_AdapterAbstract
* @return bool
* @throws Registrar_Exception
*/
abstract public function isDomainCanBeTransfered(Registrar_Domain $domain);
abstract public function isDomainCanBetransferred(Registrar_Domain $domain);
/**
* @return bool
+3 -3
View File
@@ -3780,7 +3780,7 @@ msgid ""
msgstr ""
msgid ""
"data-product attribute value will be overiden if popup's product is selected "
"data-product attribute value will be if popup's product is selected "
"from select-box above"
msgstr ""
@@ -4029,7 +4029,7 @@ msgstr ""
msgid ""
"Please keep in mind that field name can not start with number. Special "
"characters will be replaced with underscrore ( _ )"
"characters will be replaced with underscores ( _ )"
msgstr ""
msgid "Label"
@@ -5366,7 +5366,7 @@ msgstr ""
msgid "Error message:"
msgstr ""
msgid "Set paid supoprt for helpdesks: "
msgid "Set paid support for helpdesks: "
msgstr ""
msgid "Create new helpdesk"
+3 -3
View File
@@ -3779,7 +3779,7 @@ msgid ""
msgstr ""
msgid ""
"data-product attribute value will be overiden if popup's product is selected "
"data-product attribute value will be overridden if popup's product is selected "
"from select-box above"
msgstr ""
@@ -4028,7 +4028,7 @@ msgstr ""
msgid ""
"Please keep in mind that field name can not start with number. Special "
"characters will be replaced with underscrore ( _ )"
"characters will be replaced with underscores ( _ )"
msgstr ""
msgid "Label"
@@ -5365,7 +5365,7 @@ msgstr ""
msgid "Error message:"
msgstr ""
msgid "Set paid supoprt for helpdesks: "
msgid "Set paid support for helpdesks: "
msgstr ""
msgid "Create new helpdesk"
+2 -2
View File
@@ -123,8 +123,8 @@ class Service implements InjectionAwareInterface
}
if (!empty($where)) {
$whereStatment = implode(' and ', $where);
$sql .= ' WHERE '.$whereStatment;
$whereStatement = implode(' and ', $where);
$sql .= ' WHERE '.$whereStatement;
}
$sql .= ' ORDER by m.id desc';
+1 -1
View File
@@ -249,7 +249,7 @@ class Client implements InjectionAwareInterface
{
$allowed = ['guest', 'client', 'admin'];
if (!in_array($role, $allowed)) {
throw new \Box_Exception('Unknow API call', null, 701);
throw new \Box_Exception('Unknown API call', null, 701);
}
return true;
+2 -2
View File
@@ -154,7 +154,7 @@ class Admin extends \Api_Abstract
$data['email'] = $this->di['tools']->validateAndSanitizeEmail($data['email']);
$service = $this->getService();
if ($service->emailAreadyRegistered($data['email'])) {
if ($service->emailAlreadyRegistered($data['email'])) {
throw new \Box_Exception('Email is already registered.');
}
@@ -247,7 +247,7 @@ class Admin extends \Api_Abstract
if (!is_null($this->di['array_get']($data, 'email'))) {
$email = $this->di['array_get']($data, 'email');
$email = $this->di['tools']->validateAndSanitizeEmail($email);
if ($service->emailAreadyRegistered($email, $client)) {
if ($service->emailAlreadyRegistered($email, $client)) {
throw new \Box_Exception('Can not change email. It is already registered.');
}
}
+2 -2
View File
@@ -31,7 +31,7 @@ class Client extends \Api_Abstract
}
/**
* Update currencty logged in client details.
* Update currently logged in client details.
*
* @optional string $email - new client email. Must not exist on system
* @optional string $last_name - last name
@@ -84,7 +84,7 @@ class Client extends \Api_Abstract
$this->getService()->canChangeEmail($client, $email);
if ($this->getService()->emailAreadyRegistered($email, $client)) {
if ($this->getService()->emailAlreadyRegistered($email, $client)) {
throw new \Box_Exception('Can not change email. It is already registered.');
}
$client->email = strtolower(trim($email));
+2 -2
View File
@@ -198,8 +198,8 @@ class Guest extends \Api_Abstract
$email['to_client'] = $c->id;
$email['code'] = 'mod_client_password_reset_request';
$email['hash'] = $hash;
$emailSerivce = $this->di['mod_service']('email');
$emailSerivce->sendTemplate($email);
$emailService = $this->di['mod_service']('email');
$emailService->sendTemplate($email);
$this->di['logger']->info('Client requested password reset. Sent to email %s', $c->email);
+1 -1
View File
@@ -203,7 +203,7 @@ class Service implements InjectionAwareInterface
];
}
public function emailAreadyRegistered($new_email, \Model_Client $model = null)
public function emailAlreadyRegistered($new_email, \Model_Client $model = null)
{
if ($model && $model->email == $new_email) {
return false;
+2 -2
View File
@@ -60,10 +60,10 @@ class Guest extends \Api_Abstract
*
* @optional bool $convert - covert to default currency rate. Default - true;
* @optional bool $without_currency - Show only number. No symbols are attached Default - false;
* @optional float $price - Price to be formated. Default 0
* @optional float $price - Price to be formatted. Default 0
* @optional string $code - currency code, ie: USD. Default - default currency
*
* @return string - formated string
* @return string - formatted string
*/
public function format($data = [])
{
@@ -128,7 +128,7 @@
<div class="tab_content nopadding" id="tab-api-settings">
<div class="help">
<h3>{{ 'Adjust settings for currency rate updater'|trans }}</h3>
<p>FOSSBilling uses data grabbed from <a href="https://www.ecb.europa.eu/home/html/index.en.html">European Central Bank</a> for conversions from Euro to other currencies, and <a href="https://currencylayer.com/">currencylayer</a> for conversations from US Dollar to other currencies.<br />If you choose Euro as your default currency, data from European Central Bank will be used, if you choose US Dollar, data from currencylayer will be used.<br />While European Central Bank decided to keep it's API free to everyone, you won't need an autorization key to use ECB's data. However, you'll need an API key to use currencylayer.<br />You can <a href="https://currencylayer.com/product">grab your API key</a> from currencylayer's website. FOSSBilling doesn't make any profits from your purchases on currencylayer.com</p>
<p>FOSSBilling uses data grabbed from <a href="https://www.ecb.europa.eu/home/html/index.en.html">European Central Bank</a> for conversions from Euro to other currencies, and <a href="https://currencylayer.com/">currencylayer</a> for conversations from US Dollar to other currencies.<br />If you choose Euro as your default currency, data from European Central Bank will be used, if you choose US Dollar, data from currencylayer will be used.<br />While European Central Bank decided to keep it's API free to everyone, you won't need an authorization key to use ECB's data. However, you'll need an API key to use currencylayer.<br />You can <a href="https://currencylayer.com/product">grab your API key</a> from currencylayer's website. FOSSBilling doesn't make any profits from your purchases on currencylayer.com</p>
<p><b>FOSSBilling does not take any responsibilities for data grabbed from 3rd party sources, including European Central Bank and currencylayer.</b></p>
</div>
<form method="post" action="{{ 'api/admin/currency/update_rate_settings'|link }}" class="mainForm save api-form" data-api-msg="Successfully updated settings">
+3 -3
View File
@@ -141,14 +141,14 @@ class Service implements \Box\InjectionAwareInterface
unset($vars['to'], $vars['to_client'], $vars['to_staff'], $vars['to_name'], $vars['from'], $vars['from_name']);
unset($vars['default_description'], $vars['default_subject'], $vars['default_template'], $vars['code']);
// add aditional variables to template
// add additional variables to template
if (isset($data['to_staff']) && $data['to_staff']) {
$staffService = $this->di['mod_service']('staff');
$staff = $staffService->getList(['status' => 'active', 'no_cron' => true]);
$vars['staff'] = $staff['list'][0];
}
// add aditional variables to template
// add additional variables to template
if (isset($data['to_client']) && $data['to_client'] > 0) {
$clientService = $this->di['mod_service']('client');
$customer = $clientService->get(['id' => $data['to_client']]);
@@ -483,7 +483,7 @@ class Service implements \Box\InjectionAwareInterface
$dir = pathinfo($dir, PATHINFO_FILENAME);
$mod = strtolower($dir);
// skip if disableda
// skip if disabled
$extensionService = $this->di['mod_service']('extension');
if (!$extensionService->isExtensionActive('mod', $mod)) {
+1 -1
View File
@@ -51,7 +51,7 @@ class Admin implements \Box\InjectionAwareInterface
return [
'group' => [
'index' => 1500, // menu sort order
'location' => 'example', // menu group identificator for subitems
'location' => 'example', // menu group identifier for subitems
'label' => 'Example module', // menu group title
'class' => 'example', // used for css styling menu item
],
+5 -5
View File
@@ -56,7 +56,7 @@ class Admin extends \Api_Abstract
*
* @optional
* @optional string $label - Label of the field which will be shown. Default value "Type X" where X is number of fields in form. For example "Checkbox 2"
* @optional string $name - Name of the field. Dafault value "new_type_X" where X is number of fields in the form. For example "new_checkbox_2"
* @optional string $name - Name of the field. Default value "new_type_X" where X is number of fields in the form. For example "new_checkbox_2"
* @optional bool $hide_label - Option either hide label of field or not
* @optional string $description - Description of a field
* @optional mixed $default_value - Default value of field. If field is checkbox or radio this variable must be array, otherwise it is string
@@ -70,7 +70,7 @@ class Admin extends \Api_Abstract
* @optional bool $show_middle - Either show middle or not
* @optional bool $show_prefix - Either to show prefix or not
* @optional bool $show_suffix - Either to show suffix or not
* @optional int $text_size - Prefered text size
* @optional int $text_size - Preferred text size
*
* @return int - ID of created field
*
@@ -227,7 +227,7 @@ class Admin extends \Api_Abstract
*
* @optional
* @optional string $label - Label of the field which will be shown. Default value "Type X" where X is number of fields in form. For example "Checkbox 2"
* @optional string $name - Name of the field. Dafault value "new_type_X" where X is number of fields in the form. For example "new_checkbox_2"
* @optional string $name - Name of the field. Default value "new_type_X" where X is number of fields in the form. For example "new_checkbox_2"
* @optional bool $hide_label - Option either hide label of field or not
* @optional string $description - Description of a field
* @optional mixed $default_value - Default value of field. If field is checkbox or radio this variable must be array, otherwise it is string
@@ -239,9 +239,9 @@ class Admin extends \Api_Abstract
* @optional array $options - Array of options for "select", "checkbox" and "radio" type fields. Key represents label and value will be field's value. Array must be unique.
* @optional bool $show_initial - Either show initial or not
* @optional bool $show_middle - Either show middle or not
* @optional bool $show_prefix - Eithor to show prefix or not
* @optional bool $show_prefix - Either to show prefix or not
* @optional bool $show_suffix - Either to show suffix or not
* @optional int $text_size - Prefered text size
* @optional int $text_size - Preferred text size
*
* @return int - ID of the field
*
@@ -17,7 +17,7 @@
<input type="text" name="name" value="{{field.name}}" id="name"/>
</li>
<li class="sep">
{{ 'Please keep in mind that field name can not start with number. Special characters will be replaced with underscrore ( _ )'|trans }}
{{ 'Please keep in mind that field name can not start with number. Special characters will be replaced with underscores ( _ )'|trans }}
</li>
</ul>
</div>
@@ -79,7 +79,7 @@
<td>{{ form.product_count }}</td>
<td class="actions">
<a class="bb-button btn14" href="{{ 'extension/settings/formbuilder'|alink({'id' : form.id}) }}"><img src="assets/icons/edit.svg" alt=""></a>
<a class="bb-button btn14 copy_form" href="#" data-api-reload="1" title="Copy" data-form-id="{{ form.id }}"><img src="images/icons/dark/baloons.png" alt=""></a>
<a class="bb-button btn14 copy_form" href="#" data-api-reload="1" title="Copy" data-form-id="{{ form.id }}"><img src="images/icons/dark/balloons.png" alt=""></a>
<a class="btn14 bb-rm-tr api-link" href="{{'api/admin/formbuilder/delete_form'|link({'id' : form.id}) }}" data-api-confirm="Are you sure?" ><img src="assets/icons/delete.svg" alt=""></a>
</td>
</tr>
+1 -1
View File
@@ -197,7 +197,7 @@ class Service implements InjectionAwareInterface
continue;
}
// disconect modules without service class
// disconnect modules without service class
$mod = $this->di['mod']($mod_name);
if (!$mod->hasService()) {
$this->di['db']->exec($rm_sql, ['id' => $listener['id']]);
+2 -2
View File
@@ -54,7 +54,7 @@ class Admin extends \Api_Abstract
}
/**
* Sets invoce status to paid. This method differs from invoice update method
* Sets invoice status to paid. This method differs from invoice update method
* in a way that it sends notification to Events system, so emails are sent.
* Also this will try to automatically apply payment if clients balance is
* available.
@@ -722,7 +722,7 @@ class Admin extends \Api_Abstract
}
/**
* Get list of subscribtions.
* Get list of subscriptions.
*
* @return array
*/
+1 -1
View File
@@ -676,7 +676,7 @@ class Service implements InjectionAwareInterface
$pi->type = $item->type;
$pi->rel_id = $item->rel_id;
$pi->task = $item->task;
$pi->status = \Model_InvoiceItem::STATUS_EXECUTED; // ark refund invoce as executed
$pi->status = \Model_InvoiceItem::STATUS_EXECUTED; // ark refund invoice as executed
$pi->title = $item->title;
$pi->period = $item->period;
$pi->quantity = $item->quantity;
@@ -39,7 +39,7 @@ class ServiceSubscription implements InjectionAwareInterface
return $this->di;
}
public function create(\Model_Client $cient, \Model_PayGateway $pg, array $data)
public function create(\Model_Client $client, \Model_PayGateway $pg, array $data)
{
$model = $this->di['db']->dispense('Subscription');
$model->client_id = $data['client_id'];
@@ -207,7 +207,7 @@ class ServiceSubscription implements InjectionAwareInterface
return false;
}
// check if first invoice line has deined period
// check if first invoice line has denied period
$query = 'SELECT id, period
FROM invoice_item
WHERE invoice_id = :id
@@ -38,7 +38,7 @@
<td>{{ msg.from_name }} <br/>{{ msg.from_email }}</td>
<td>{{ mf.status_name(msg.status) }}</td>
<td class="actions">
<a class="bb-button btn14 api-link" href="{{ 'api/admin/massmailer/copy'|link({'id' : msg.id}) }}" data-api-redirect="{{ 'massmailer'|alink }}" title="Copy"><img src="images/icons/dark/baloons.png" alt=""></a>
<a class="bb-button btn14 api-link" href="{{ 'api/admin/massmailer/copy'|link({'id' : msg.id}) }}" data-api-redirect="{{ 'massmailer'|alink }}" title="Copy"><img src="images/icons/dark/balloons.png" alt=""></a>
<a class="bb-button btn14" href="{{ '/massmailer/message'|alink }}/{{msg.id}}"><img src="assets/icons/edit.svg" alt=""></a>
<a class="bb-button btn14 bb-rm-tr api-link" data-api-confirm="Are you sure?" href="{{ 'api/admin/massmailer/delete'|link({'id' : msg.id}) }}" data-api-redirect="{{ 'massmailer'|alink }}"><img src="assets/icons/delete.svg" alt=""></a>
</td>
+3 -3
View File
@@ -620,7 +620,7 @@ class Service implements InjectionAwareInterface
$invoiceService->approveInvoice($invoice, ['id' => $invoice->id, 'use_credits' => true]);
}
// activate imediately if say so
// activate immediately if say so
if ($activate) {
try {
$this->activateOrder($order);
@@ -936,7 +936,7 @@ class Service implements InjectionAwareInterface
$logic = $this->di['array_get']($config, 'order_renewal_logic', '');
if ('from_today' == $logic) {
$from_time = time(); // renew order from the date renewal occured
$from_time = time(); // renew order from the date renewal occurred
} elseif ('from_greater' == $logic) {
if (strtotime($order->expires_at) > time()) {
$from_time = strtotime($order->expires_at);
@@ -976,7 +976,7 @@ class Service implements InjectionAwareInterface
$order->updated_at = date('Y-m-d H:i:s');
$this->di['db']->store($order);
$note = (null === $reason) ? 'Order suspeded' : 'Order suspended for '.$reason;
$note = (null === $reason) ? 'Order suspended' : 'Order suspended for '.$reason;
$this->saveStatusChange($order, $note);
if (!$skipEvent) {
@@ -184,7 +184,7 @@
<p id="button-info">
{{ 'Add order-button class to your elements which must call popup. For example: '|trans }}<strong>&lt;button type=&quot;button&quot;<span class="red">&nbsp;class=&quot;order-button</span>&quot; &gt;Order Now&lt;/button&gt;</strong>
<p>{{ 'Add data-product attribute to your element to open specific product. For example:<br/>'|trans }}<strong>&lt;button type=&quot;button&quot; class=&quot;order-button" <span class="red">data-product="2"</span> &gt;Order Product#2 Now &lt;/button&gt;</strong></p>
<p>{{ 'data-product attribute value will be overiden if popup\'s product is selected from select-box above'|trans }}</p>
<p>{{ 'data-product attribute value will be overridden if popup\'s product is selected from select-box above'|trans }}</p>
</p>
</div>
</div>
@@ -47,7 +47,7 @@
</div>
<div class="tab_content nopadding" id="tab-addons">
<div class="help">
<h5>{{ 'Set paid supoprt for helpdesks: '|trans }}</h5>
<h5>{{ 'Set paid support for helpdesks: '|trans }}</h5>
</div>
<table class="tableStatic wide">
<tbody>
+1 -1
View File
@@ -117,7 +117,7 @@ class Admin extends \Api_Abstract
}
/**
* Update prodcut settings.
* Update product settings.
*
* @param int $id - product id
*
+1 -1
View File
@@ -942,7 +942,7 @@ class Service implements InjectionAwareInterface
return 0;
}
// check if promo code aplies to specific period only
// check if promo code applies to specific period only
if (isset($config['period'])) {
$periods = $this->getPeriods($promo);
if (!empty($periods) && !in_array($config['period'], $periods)) {
+1 -1
View File
@@ -31,7 +31,7 @@ class Client extends \Api_Abstract
}
/**
* Update currencty logged in client details.
* Update currently logged in client details.
*
* @optional string $email - new client email. Must not exist on system
* @optional string $last_name - last name
+1 -1
View File
@@ -125,7 +125,7 @@ class Service implements InjectionAwareInterface
$validator->isEmailValid($email);
$clientService = $this->di['mod_service']('client');
if ($clientService->emailAreadyRegistered($email, $client)) {
if ($clientService->emailAlreadyRegistered($email, $client)) {
throw new \Box_Exception('Can not change email. It is already registered.');
}
+4 -4
View File
@@ -13,7 +13,7 @@
*/
/**
* Queue is a powerfull tool to execute long running tasks in the background.
* Queue is a powerful tool to execute long running tasks in the background.
*/
namespace Box\Mod\Queue\Api;
@@ -43,7 +43,7 @@ class Admin extends \Api_Abstract
/**
* Get queue details.
*
* @param string $queue - queue name, ie: massemails
* @param string $queue - queue name, ie: massmailer
*
* @return array
*/
@@ -79,7 +79,7 @@ class Admin extends \Api_Abstract
/**
* Add message to queue to be executed later.
*
* @param string $queue - unique queue name, ie: massemails
* @param string $queue - unique queue name, ie: massmailer
* @param string $mod - module name, ie: massmailer
*
* @optional string $execute_at - Message execution time. Schedule message to be executed later, ie: 2022-12-29 14:53:51
@@ -150,7 +150,7 @@ class Admin extends \Api_Abstract
* @optional int $interval - interval in seconds for message to be executed. Default is queue timeout
* @optional bool $until_complete - Execute until all messages in queue are executed. Default true
*
* @return bool - returns true when queue finihed executing
* @return bool - returns true when queue finished executing
*/
public function execute($data)
{
+1 -1
View File
@@ -90,7 +90,7 @@ class Client extends \Api_Abstract
}
/**
* Retireve domain transfer code.
* Retrieve domain transfer code.
*
* @param int $order_id - domain order id
*
+1 -1
View File
@@ -134,7 +134,7 @@ class Guest extends \Api_Abstract
if (!$tld instanceof \Model_Tld) {
throw new \Box_Exception('TLD is not active.');
}
if (!$this->getService()->canBeTransfered($tld, $data['sld'])) {
if (!$this->getService()->canBetransferred($tld, $data['sld'])) {
throw new \Box_Exception('Domain can not be transferred.');
}
+3 -3
View File
@@ -104,7 +104,7 @@ class Service implements \Box\InjectionAwareInterface
}
$domain = $data['transfer_sld'].$tld->tld;
if (!$this->canBeTransfered($tld, $data['transfer_sld'])) {
if (!$this->canBetransferred($tld, $data['transfer_sld'])) {
throw new \Box_Exception(':domain can not be transferred!', [':domain' => $domain]);
}
@@ -527,7 +527,7 @@ class Service implements \Box\InjectionAwareInterface
return true;
}
public function canBeTransfered(\Model_Tld $model, $sld)
public function canBetransferred(\Model_Tld $model, $sld)
{
if (empty($sld)) {
throw new \Box_Exception('Domain name is not valid');
@@ -545,7 +545,7 @@ class Service implements \Box\InjectionAwareInterface
$tldRegistrar = $this->di['db']->load('TldRegistrar', $model->tld_registrar_id);
$adapter = $this->registrarGetRegistrarAdapter($tldRegistrar);
return $adapter->isDomainCanBeTransfered($domain);
return $adapter->isDomainCanBetransferred($domain);
}
public function isDomainAvailable(\Model_Tld $model, $sld)
+5 -5
View File
@@ -78,7 +78,7 @@ class Admin extends \Api_Abstract
*
* @param int $order_id - Hosting account order id
* @param string $tld - Top level domain value, ie: .com
* @param string $sld - Second level domain value, ie: domainname
* @param string $sld - Second level domain value, ie: domain name
*
* @return bool
*/
@@ -319,7 +319,7 @@ class Admin extends \Api_Abstract
}
/**
* Get hoting plan pairs.
* Get hosting plan pairs.
*
* @return array
*/
@@ -329,7 +329,7 @@ class Admin extends \Api_Abstract
}
/**
* Get hostin plans paginated list.
* Get hosting plans paginated list.
*
* @return array
*/
@@ -442,8 +442,8 @@ class Admin extends \Api_Abstract
$this->di['validator']->checkRequiredParamsForArray($required, $data);
$order = $this->di['db']->getExistingModelById('ClientOrder', $data['order_id'], 'Order not found');
$orderSerivce = $this->di['mod_service']('order');
$s = $orderSerivce->getOrderService($order);
$orderService = $this->di['mod_service']('order');
$s = $orderService->getOrderService($order);
if (!$s instanceof \Model_ServiceHosting) {
throw new \Box_Exception('Order is not activated');
}
+2 -2
View File
@@ -87,8 +87,8 @@ class Client extends \Api_Abstract
throw new \Box_Exception('Order not found');
}
$orderSerivce = $this->di['mod_service']('order');
$s = $orderSerivce->getOrderService($order);
$orderService = $this->di['mod_service']('order');
$s = $orderService->getOrderService($order);
if (!$s instanceof \Model_ServiceHosting) {
throw new \Box_Exception('Order is not activated');
}
+1 -1
View File
@@ -40,7 +40,7 @@ class Admin extends \Api_Abstract
* Update license parameters. Set which validation rules must be applied
* for license.
*
* @param int $order_id - License irder id
* @param int $order_id - License order id
*
* @optional string $plugin - New license plugin name
* @optional bool $validate_ip - True to validate IP; False - to allow all IPs for this license
@@ -59,7 +59,7 @@ class Simple
/**
* This method is optional.
* Aditional validation rules can be applied to license validation logic.
* Additional validation rules can be applied to license validation logic.
* Method is called after "expiration, ip, version, path, hostname validations are passed".
*
* Should throw "LogicException" if validation fails
+6 -6
View File
@@ -211,8 +211,8 @@ class Service implements InjectionAwareInterface
*/
public function action_delete(\Model_ClientOrder $order)
{
$prderService = $this->di['mod_service']('order');
$service = $prderService->getOrderService($order);
$orderService = $this->di['mod_service']('order');
$service = $orderService->getOrderService($order);
if ($service instanceof \Model_ServiceLicense) {
$this->di['db']->trash($service);
}
@@ -250,8 +250,8 @@ class Service implements InjectionAwareInterface
public function isLicenseActive(\Model_ServiceLicense $model)
{
$prderService = $this->di['mod_service']('order');
$o = $prderService->getServiceOrder($model);
$orderService = $this->di['mod_service']('order');
$o = $orderService->getServiceOrder($model);
if ($o instanceof \Model_ClientOrder) {
return \Model_ClientOrder::STATUS_ACTIVE == $o->status;
}
@@ -353,8 +353,8 @@ class Service implements InjectionAwareInterface
public function getExpirationDate(\Model_ServiceLicense $model)
{
$prderService = $this->di['mod_service']('order');
$o = $prderService->getServiceOrder($model);
$orderService = $this->di['mod_service']('order');
$o = $orderService->getServiceOrder($model);
if ($o instanceof \Model_ClientOrder) {
return $o->expires_at;
}
+1 -1
View File
@@ -13,7 +13,7 @@
*/
/**
* Spam cheking module management.
* Spam checking module management.
*/
namespace Box\Mod\Spamchecker\Api;
+1 -1
View File
@@ -83,7 +83,7 @@ class Service implements InjectionAwareInterface
$blocked_ips = explode(PHP_EOL, $config['blocked_ips']);
$blocked_ips = array_map('trim', $blocked_ips);
if (in_array($di['request']->getClientAddress(), $blocked_ips)) {
throw new \Box_Exception('Your IP addresss (:ip) is blocked. Please contact our support to lift your block.', [':ip' => $di['request']->getClientAddress()], 403);
throw new \Box_Exception('Your IP address (:ip) is blocked. Please contact our support to lift your block.', [':ip' => $di['request']->getClientAddress()], 403);
}
}
}
+4 -4
View File
@@ -33,7 +33,7 @@ class Admin extends \Api_Abstract
$pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page);
foreach ($pager['list'] as $key => $item) {
$staff = $this->di['db']->getExistingModelById('Admin', $item['id'], 'Admin is not found');
$pager['list'][$key] = $this->getService()->toModel_AdminApiiArray($staff);
$pager['list'][$key] = $this->getService()->toModel_AdminApiArray($staff);
}
return $pager;
@@ -57,7 +57,7 @@ class Admin extends \Api_Abstract
$model = $this->di['db']->getExistingModelById('Admin', $data['id'], 'Staff member not found');
return $this->getService()->toModel_AdminApiiArray($model);
return $this->getService()->toModel_AdminApiArray($model);
}
/**
@@ -92,7 +92,7 @@ class Admin extends \Api_Abstract
}
/**
* Completely delete staff member. Removes all related acitivity from logs.
* Completely delete staff member. Removes all related activity from logs.
*
* @param int $id - staff member ID
*
@@ -215,7 +215,7 @@ class Admin extends \Api_Abstract
$this->getService()->setPermissions($model->id, $data['permissions']);
$this->di['logger']->info('Changed staff member %s permisions', $model->id);
$this->di['logger']->info('Changed staff member %s permissions', $model->id);
return true;
}
+1 -1
View File
@@ -384,7 +384,7 @@ class Service implements InjectionAwareInterface
return $cron;
}
public function toModel_AdminApiiArray(\Model_Admin $model, $deep = false)
public function toModel_AdminApiArray(\Model_Admin $model, $deep = false)
{
$data = [
'id' => $model->id,
+1 -1
View File
@@ -95,7 +95,7 @@ class Admin extends \Api_Abstract
}
/**
* Return icome by day. If no timespan is selected method returns
* Return income by day. If no timespan is selected method returns
* previous month statistics.
*
* @optional string $date_from - day since income are counted
+1 -1
View File
@@ -346,7 +346,7 @@ class Admin extends \Api_Abstract
}
/**
* Set iquery status to closed.
* Set id status to closed.
*
* @param int $id - inquiry id
*
+1 -1
View File
@@ -1364,7 +1364,7 @@ class Service implements \Box\InjectionAwareInterface
$this->di['db']->trash($model);
$this->di['logger']->info('Deleted canned reponse #%s', $id);
$this->di['logger']->info('Deleted canned response #%s', $id);
return true;
}
+1 -1
View File
@@ -109,7 +109,7 @@ class Theme
// remove style attributes
$settings_page = preg_replace('/(<[^>]+) style=".*?"/i', '$1', $settings_page);
// fix unclosed texarea
// fix unclosed text area
$settings_page = preg_replace('/<textarea (.*)\/>/i', '<textarea $1></textarea>', $settings_page);
return $settings_page;
@@ -76,7 +76,7 @@
</td>
<td>
From {% if promo.start_at %}{{ promo.start_at|date('Y-m-d') }}{% else %}now{% endif %}
untill {% if promo.end_at %}{{ promo.end_at|date('Y-m-d') }}{% else %}disabled{% endif %}
until {% if promo.end_at %}{{ promo.end_at|date('Y-m-d') }}{% else %}disabled{% endif %}
</td>
<td>
{% if promo.active == true %}
@@ -454,7 +454,7 @@ abstract class elFinderVolumeDriver {
}
/**
* Configure after successfull mount.
* Configure after successful mount.
* By default set thumbnails path and image manipulation library.
*
* @return void
@@ -44,7 +44,7 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
/*********************************************************************/
/**
* Configure after successfull mount.
* Configure after successful mount.
*
* @return void
* @author Dmitry (dio) Levashov
@@ -178,7 +178,7 @@ class elFinderVolumeMySQL extends elFinderVolumeDriver {
/**
* Perform sql query and return result.
* Increase sqlCnt and save error if occured
* Increase sqlCnt and save error if occurred
*
* @param string $sql query
* @return misc
+1 -1
View File
@@ -221,7 +221,7 @@
<table>
<tr>
<td><label for="meta_title">Meta title sufix</label></td>
<td><label for="meta_title">Meta title suffix</label></td>
<td><input type="text" name="meta_title" id="meta_title" value="" class="long"/></td>
</tr>
+1 -1
View File
@@ -177,7 +177,7 @@ LOCK TABLES `kb_article` WRITE;
INSERT INTO `kb_article` (`id`, `kb_article_category_id`, `views`, `title`, `content`, `slug`, `status`, `created_at`, `updated_at`)
VALUES
(1,2,0,'How to contact support','Registered clients can contact our support team:\n------------------------------------------------------------\n\n* Login to clients area\n* Select **Support** menu item\n* Click **Submit new ticket**\n* Fill the form and press *Submit*\n\nGuests can contact our support team:\n------------------------------------------------------------\n\n* Use our contact form.\n* Fill the form and click *Submit*\n','how-to-contact-support','active','2021-01-01 12:00:00','2021-01-01 12:00:00'),
(2,2,0,'How to place new order','To place new order, follow these steps:\n------------------------------------------------------------\n\n* Select our services at *Order* page.\n* Depending on selected product, you might need to provide additional information to complete order request.\n* Click \"Continue\" and your product/service is now in shopping cart.\n* If you have promo code, you can apply it and get discount.\n* Click on \"Checkout\" button to proceed with checkout process\n * If you are already logged in, uou will be automaticaly redirected to new invoice\n * If you are registerd client, you can provide your login details\n * If you have never purchased any service from us, fill up client sign up form, and continue checkout\n* Choose payment method to pay for invoice. List of all avalable payment methods will be listed below invoice details.\n* Choose payment method\n* You will be redirected to payment gateway page\n* After successfull payment, You will be redirected back to invoice page.\n* Depending on selected services your order will be reviewed and activated by our staff members.\n* After you receive confirmation email about order activation you are able to manage your services.\n','how-to-place-new-order','active','2021-01-01 12:00:00','2021-01-01 12:00:00'),
(2,2,0,'How to place new order','To place new order, follow these steps:\n------------------------------------------------------------\n\n* Select our services at *Order* page.\n* Depending on selected product, you might need to provide additional information to complete order request.\n* Click \"Continue\" and your product/service is now in shopping cart.\n* If you have promo code, you can apply it and get discount.\n* Click on \"Checkout\" button to proceed with checkout process\n * If you are already logged in, uou will be automaticaly redirected to new invoice\n * If you are registerd client, you can provide your login details\n * If you have never purchased any service from us, fill up client sign up form, and continue checkout\n* Choose payment method to pay for invoice. List of all avalable payment methods will be listed below invoice details.\n* Choose payment method\n* You will be redirected to payment gateway page\n* After successful payment, You will be redirected back to invoice page.\n* Depending on selected services your order will be reviewed and activated by our staff members.\n* After you receive confirmation email about order activation you are able to manage your services.\n','how-to-place-new-order','active','2021-01-01 12:00:00','2021-01-01 12:00:00'),
(3,2,0,'Example article','Example article heading\n------------------------------------------------------------\n\nCursus, parturient porta dis sit? Habitasse non, sociis porttitor, sagittis dapibus scelerisque? Pid, porttitor integer, montes. Hac, in? Arcu nunc integer nascetur dis nisi. In, sed a amet? Adipiscing odio mauris mauris, porta, integer, adipiscing habitasse, elementum phasellus, turpis in? Quis magna placerat eu, cursus urna mattis egestas, a ac massa turpis mus et odio pid in, urna dapibus ridiculus in turpis cursus ac a urna magna purus etiam ac nisi porttitor! Auctor est? In adipiscing, hac platea augue vut, hac est cum sagittis! Montes nascetur pulvinar tristique porta platea? Magnis vel etiam nisi augue auctor sit pulvinar! Aliquet rhoncus, elit porta? Magnis pulvinar eu turpis purus sociis a augue? Sit, nascetur! Mattis nisi, penatibus ac ac natoque auctor turpis.\n\nExample article heading\n------------------------------------------------------------\n\nUt diam cursus, elit pulvinar, habitasse purus? Enim. Urna? Velit arcu, rhoncus sociis sed, et, ultrices nascetur lacus vut purus tempor a. Vel? Sagittis integer scelerisque, dapibus lectus mid, magnis, augue duis velit etiam tortor! Eros, a et phasellus est ultricies integer elementum in, tempor sed parturient. Dictumst rhoncus, ut sed sagittis facilisis? In, proin? Urna augue in sociis enim dignissim! Velit magna tincidunt ac. Nunc, vel auctor porta enim integer. Phasellus amet eu. Tristique lundium arcu! In? Massa penatibus arcu, rhoncus augue ut pid pulvinar, porttitor, porta, et! A sit odio, proin natoque ultrices cras cras magna porttitor! Ultrices sed magna in! Porttitor nunc, tincidunt nec, amet integer aenean. Tincidunt, placerat nec dolor parturient et ac pulvinar a.\n','example-article-slug','active','2021-01-01 12:00:00','2021-01-01 12:00:00');
/*!40000 ALTER TABLE `kb_article` ENABLE KEYS */;
@@ -125,7 +125,7 @@ class Registrar_Adapter_ResellerclubTest extends PHPUnit\Framework\TestCase
$this->assertFalse($result);
}
public function testisDomainCanBeTransfered()
public function testisDomainCanBetransferred()
{
$adapterMock = $this->getMockBuilder('Registrar_Adapter_Resellerclub')->disableOriginalConstructor()
->setMethods(array('_makeRequest'))
@@ -140,7 +140,7 @@ class Registrar_Adapter_ResellerclubTest extends PHPUnit\Framework\TestCase
->with('domains/validate-transfer')
->willReturn($requestResult);
$result = $adapterMock->isDomainCanBeTransfered($registrarDomain);
$result = $adapterMock->isDomainCanBetransferred($registrarDomain);
$this->assertIsBool($result);
$this->assertTrue($result);
}
+4 -4
View File
@@ -147,7 +147,7 @@ class AdminTest extends \BBTestCase
$serviceMock = $this->getMockBuilder('\Box\Mod\Client\Service')->getMock();
$serviceMock->expects($this->atLeastOnce())->
method('emailAreadyRegistered')->will($this->returnValue(false));
method('emailAlreadyRegistered')->will($this->returnValue(false));
$serviceMock->expects($this->atLeastOnce())->
method('adminCreateClient')->will($this->returnValue(1));
@@ -184,7 +184,7 @@ class AdminTest extends \BBTestCase
$serviceMock = $this->getMockBuilder('\Box\Mod\Client\Service')->getMock();
$serviceMock->expects($this->atLeastOnce())->
method('emailAreadyRegistered')->will($this->returnValue(true));
method('emailAlreadyRegistered')->will($this->returnValue(true));
$validatorMock = $this->getMockBuilder('\Box_Validate')->getMock();
@@ -297,7 +297,7 @@ class AdminTest extends \BBTestCase
$serviceMock = $this->getMockBuilder('\Box\Mod\Client\Service')->getMock();
$serviceMock->expects($this->atLeastOnce())->
method('emailAreadyRegistered')->will($this->returnValue(false));
method('emailAlreadyRegistered')->will($this->returnValue(false));
$serviceMock->expects($this->atLeastOnce())->
method('canChangeCurrency')->will($this->returnValue(true));
@@ -381,7 +381,7 @@ class AdminTest extends \BBTestCase
$serviceMock = $this->getMockBuilder('\Box\Mod\Client\Service')->getMock();
$serviceMock->expects($this->atLeastOnce())->
method('emailAreadyRegistered')->will($this->returnValue(true));
method('emailAlreadyRegistered')->will($this->returnValue(true));
$serviceMock->expects($this->never())->
method('canChangeCurrency')->will($this->returnValue(true));
+1 -1
View File
@@ -135,7 +135,7 @@ class ClientTest extends \BBTestCase {
$serviceMock = $this->getMockBuilder('\Box\Mod\Client\Service')->getMock();
$serviceMock->expects($this->atLeastOnce())->
method('emailAreadyRegistered')->will($this->returnValue(false));
method('emailAlreadyRegistered')->will($this->returnValue(false));
$eventMock = $this->getMockBuilder('\Box_EventManager')->getMock();
$eventMock->expects($this->atLeastOnce())->
+3 -3
View File
@@ -322,7 +322,7 @@ class ServiceTest extends \BBTestCase {
$this->assertTrue(array_diff_key($result, $expectedArrayKeys) == array());
}
public function testemailAreadyRegistered()
public function testemailAlreadyRegistered()
{
$email = 'test@example.com';
$model = new \Model_Client();
@@ -337,7 +337,7 @@ class ServiceTest extends \BBTestCase {
$clientService = new \Box\Mod\Client\Service();
$clientService->setDi($di);
$result = $clientService->emailAreadyRegistered($email);
$result = $clientService->emailAlreadyRegistered($email);
$this->assertIsBool($result);
}
@@ -350,7 +350,7 @@ class ServiceTest extends \BBTestCase {
$clientService = new \Box\Mod\Client\Service();
$result = $clientService->emailAreadyRegistered($email, $model);
$result = $clientService->emailAlreadyRegistered($email, $model);
$this->assertIsBool($result);
$this->assertEquals(false, $result);
}
+3 -3
View File
@@ -152,7 +152,7 @@ class ServiceTest extends \BBTestCase
$clientServiceMock = $this->getMockBuilder('\Box\Mod\Client\Service')->getMock();
$clientServiceMock->expects($this->atLeastOnce())->
method('emailAreadyRegistered')->will($this->returnValue(false));
method('emailAlreadyRegistered')->will($this->returnValue(false));
$validatorMock = $this->getMockBuilder('\Box_Validate')->getMock();
$validatorMock->expects($this->atLeastOnce())->method('isEmailValid');
@@ -238,7 +238,7 @@ class ServiceTest extends \BBTestCase
$clientServiceMock = $this->getMockBuilder('\Box\Mod\Client\Service')->getMock();
$clientServiceMock->expects($this->never())->
method('emailAreadyRegistered')->will($this->returnValue(false));
method('emailAlreadyRegistered')->will($this->returnValue(false));
$validatorMock = $this->getMockBuilder('\Box_Validate')->getMock();
$validatorMock->expects($this->never())->method('isEmailValid');
@@ -295,7 +295,7 @@ class ServiceTest extends \BBTestCase
$clientServiceMock = $this->getMockBuilder('\Box\Mod\Client\Service')->getMock();
$clientServiceMock->expects($this->atLeastOnce())->
method('emailAreadyRegistered')->will($this->returnValue(true));
method('emailAlreadyRegistered')->will($this->returnValue(true));
$validatorMock = $this->getMockBuilder('\Box_Validate')->getMock();
$validatorMock->expects($this->atLeastOnce())->method('isEmailValid');
@@ -206,10 +206,10 @@ class Api_GuestTest extends \BBTestCase
public function testCan_be_transferred()
{
$serviceMock = $this->getMockBuilder('\Box\Mod\Servicedomain\Service')
->setMethods(array('tldFindOneByTld', 'canBeTransfered'))->getMock();
->setMethods(array('tldFindOneByTld', 'canBetransferred'))->getMock();
$serviceMock->expects($this->atLeastOnce())->method('tldFindOneByTld')
->will($this->returnValue(new \Model_Tld()));
$serviceMock->expects($this->atLeastOnce())->method('canBeTransfered')
$serviceMock->expects($this->atLeastOnce())->method('canBetransferred')
->will($this->returnValue(true));
$validatorMock = $this->getMockBuilder('\Box_Validate')->disableOriginalConstructor()->getMock();
@@ -233,10 +233,10 @@ class Api_GuestTest extends \BBTestCase
public function testCan_be_transferredTldNotFoundException()
{
$serviceMock = $this->getMockBuilder('\Box\Mod\Servicedomain\Service')
->setMethods(array('tldFindOneByTld', 'canBeTransfered'))->getMock();
->setMethods(array('tldFindOneByTld', 'canBetransferred'))->getMock();
$serviceMock->expects($this->atLeastOnce())->method('tldFindOneByTld')
->will($this->returnValue(null));
$serviceMock->expects($this->never())->method('canBeTransfered')
$serviceMock->expects($this->never())->method('canBetransferred')
->will($this->returnValue(true));
$validatorMock = $this->getMockBuilder('\Box_Validate')->disableOriginalConstructor()->getMock();
@@ -259,10 +259,10 @@ class Api_GuestTest extends \BBTestCase
public function testCan_be_transferredCanNotBeTransferredException()
{
$serviceMock = $this->getMockBuilder('\Box\Mod\Servicedomain\Service')
->setMethods(array('tldFindOneByTld', 'canBeTransfered'))->getMock();
->setMethods(array('tldFindOneByTld', 'canBetransferred'))->getMock();
$serviceMock->expects($this->atLeastOnce())->method('tldFindOneByTld')
->will($this->returnValue(new \Model_Tld()));
$serviceMock->expects($this->atLeastOnce())->method('canBeTransfered')
$serviceMock->expects($this->atLeastOnce())->method('canBetransferred')
->will($this->returnValue(false));
$validatorMock = $this->getMockBuilder('\Box_Validate')->disableOriginalConstructor()->getMock();
+19 -19
View File
@@ -103,7 +103,7 @@ class ServiceTest extends \BBTestCase
/**
* @dataProvider validateOrderDataProvider
*/
public function testValidateOrderData($data, $finOneByTldCalled, $canBeTransferedCalled, $isDomainAvailableCalled)
public function testValidateOrderData($data, $finOneByTldCalled, $canBetransferredCalled, $isDomainAvailableCalled)
{
$validatorMock = $this->getMockBuilder('\Box_Validate')->getMock();
$validatorMock->expects($this->atLeastOnce())->method('isSldValid')
@@ -115,11 +115,11 @@ class ServiceTest extends \BBTestCase
$tld->min_years = 2;
$serviceMock = $this->getMockBuilder('\Box\Mod\Servicedomain\Service')
->setMethods(array('tldFindOneByTld', 'canBeTransfered', 'isDomainAvailable'))->getMock();
->setMethods(array('tldFindOneByTld', 'canBetransferred', 'isDomainAvailable'))->getMock();
$serviceMock->expects($finOneByTldCalled)->method('tldFindOneByTld')
->will($this->returnValue($tld));
$serviceMock->expects($canBeTransferedCalled)->method('canBeTransfered')
$serviceMock->expects($canBetransferredCalled)->method('canBetransferred')
->will($this->returnValue(true));
$serviceMock->expects($isDomainAvailableCalled)->method('isDomainAvailable')
->will($this->returnValue(true));
@@ -226,7 +226,7 @@ class ServiceTest extends \BBTestCase
'called' => $this->atLeastOnce(),
'returns' => null
),
array( //canBeTransfered
array( //canBetransferred
'called' => $this->never(),
'returns' => true
)
@@ -245,7 +245,7 @@ class ServiceTest extends \BBTestCase
'called' => $this->atLeastOnce(),
'returns' => $tldModel
),
array( //canBeTransfered
array( //canBetransferred
'called' => $this->atLeastOnce(),
'returns' => false
)
@@ -256,7 +256,7 @@ class ServiceTest extends \BBTestCase
/**
* @dataProvider validateOrderDateTransferExceptionsProvider
*/
public function testValidateOrderDateTransferExceptions($data, $isSldValidArr, $tldFindOneByTldArr, $canBeTransfered)
public function testValidateOrderDateTransferExceptions($data, $isSldValidArr, $tldFindOneByTldArr, $canBetransferred)
{
$validatorMock = $this->getMockBuilder('\Box_Validate')->getMock();
$validatorMock->expects($isSldValidArr['called'])->method('isSldValid')
@@ -265,11 +265,11 @@ class ServiceTest extends \BBTestCase
->will($this->returnValue(null));
$serviceMock = $this->getMockBuilder('\Box\Mod\Servicedomain\Service')
->setMethods(array('tldFindOneByTld', 'canBeTransfered'))->getMock();
->setMethods(array('tldFindOneByTld', 'canBetransferred'))->getMock();
$serviceMock->expects($tldFindOneByTldArr['called'])->method('tldFindOneByTld')
->will($this->returnValue($tldFindOneByTldArr['returns']));
$serviceMock->expects($canBeTransfered['called'])->method('canBeTransfered')
->will($this->returnValue($canBeTransfered['returns']));
$serviceMock->expects($canBetransferred['called'])->method('canBetransferred')
->will($this->returnValue($canBetransferred['returns']));
$di = new \Box_Di();
$di['validator'] = $validatorMock;
@@ -354,7 +354,7 @@ class ServiceTest extends \BBTestCase
/**
* @dataProvider validateOrderDateRegisterExceptionsProvider
*/
public function testValidateOrderDateRegisterExceptions($data, $isSldValidArr, $tldFindOneByTldArr, $canBeTransfered)
public function testValidateOrderDateRegisterExceptions($data, $isSldValidArr, $tldFindOneByTldArr, $canBetransferred)
{
$validatorMock = $this->getMockBuilder('\Box_Validate')->getMock();
$validatorMock->expects($isSldValidArr['called'])->method('isSldValid')
@@ -366,8 +366,8 @@ class ServiceTest extends \BBTestCase
->setMethods(array('tldFindOneByTld', 'isDomainAvailable'))->getMock();
$serviceMock->expects($tldFindOneByTldArr['called'])->method('tldFindOneByTld')
->will($this->returnValue($tldFindOneByTldArr['returns']));
$serviceMock->expects($canBeTransfered['called'])->method('isDomainAvailable')
->will($this->returnValue($canBeTransfered['returns']));
$serviceMock->expects($canBetransferred['called'])->method('isDomainAvailable')
->will($this->returnValue($canBetransferred['returns']));
$di = new \Box_Di();
$di['validator'] = $validatorMock;
@@ -1071,11 +1071,11 @@ class ServiceTest extends \BBTestCase
$this->assertTrue($result);
}
public function testCanBeTransfered()
public function testCanBetransferred()
{
$registrarAdapterMock = $this->getMockBuilder('Registrar_Adapter_Custom')->disableOriginalConstructor()
->getMock();
$registrarAdapterMock->expects($this->atLeastOnce())->method('isDomainCanBeTransfered')
$registrarAdapterMock->expects($this->atLeastOnce())->method('isDomainCanBetransferred')
->will($this->returnValue(true));
$serviceMock = $this->getMockBuilder('\Box\Mod\Servicedomain\Service')
@@ -1102,25 +1102,25 @@ class ServiceTest extends \BBTestCase
$tld->tld = '.com';
$tld->tld_registrar_id = rand(1, 100);
$result = $serviceMock->canBeTransfered($tld, 'example');
$result = $serviceMock->canBetransferred($tld, 'example');
$this->assertTrue($result);
}
public function testCanBeTransferedEmptySldException()
public function testCanBetransferredEmptySldException()
{
$this->expectException(\Box_Exception::class);
$this->service->canBeTransfered(new \Model_Tld(), '');
$this->service->canBetransferred(new \Model_Tld(), '');
}
public function testCanBeTransferedNotAllowedException()
public function testCanBetransferredNotAllowedException()
{
$tldModel = new \Model_Tld();
$tldModel->loadBean(new \RedBeanPHP\OODBBean());
$tldModel->allow_transfer = false;
$this->expectException(\Box_Exception::class);
$this->service->canBeTransfered($tldModel, 'example');
$this->service->canBetransferred($tldModel, 'example');
}
public function testIsDomainAvailable()
+1 -1
View File
@@ -134,7 +134,7 @@ class ServiceTest extends \BBTestCase {
->willReturn($di);
$this->expectException(\Box_Exception::class);
$this->expectExceptionMessage(sprintf("Your IP addresss (%s) is blocked. Please contact our support to lift your block.", $clientIp), 403);
$this->expectExceptionMessage(sprintf("Your IP address (%s) is blocked. Please contact our support to lift your block.", $clientIp), 403);
$this->service->isBlockedIp($boxEventMock);
}
+2 -2
View File
@@ -32,7 +32,7 @@ class AdminTest extends \BBTestCase {
->method('getSearchQuery')
->will($this->returnValue(array('sqlString', array())));
$serviceMock->expects($this->atLeastOnce())
->method('toModel_AdminApiiArray')
->method('toModel_AdminApiArray')
->will($this->returnValue(array()));
$resultSet = array(
@@ -70,7 +70,7 @@ class AdminTest extends \BBTestCase {
$serviceMock = $this->getMockBuilder('\Box\Mod\Staff\Service')->getMock();
$serviceMock->expects($this->atLeastOnce())
->method('toModel_AdminApiiArray')
->method('toModel_AdminApiArray')
->will($this->returnValue(array()));
$validatorMock = $this->getMockBuilder('\Box_Validate')->getMock();
+2 -2
View File
@@ -896,7 +896,7 @@ class ServiceTest extends \BBTestCase
$this->assertInstanceOf('\Model_Admin', $result);
}
public function testtoModel_AdminApiiArray()
public function testtoModel_AdminApiArray()
{
$adminModel = new \Model_Admin();
$adminModel->loadBean(new \RedBeanPHP\OODBBean());
@@ -929,7 +929,7 @@ class ServiceTest extends \BBTestCase
$service = new \Box\Mod\Staff\Service();
$service->setDi($di);
$result = $service->toModel_AdminApiiArray($adminModel);
$result = $service->toModel_AdminApiArray($adminModel);
$this->assertNotEmpty($result);
$this->assertIsArray($result);