Fix various regressions introduced by camel case conversion
[MAILPOET-2635]
This commit is contained in:
committed by
Jack Kitterhing
parent
d955a9105a
commit
2ef41b56e0
@ -37,7 +37,7 @@ class Updater {
|
|||||||
if (version_compare($this->version, $latestVersion->new_version, '<')) { // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
if (version_compare($this->version, $latestVersion->new_version, '<')) { // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
||||||
$updateTransient->response[$this->plugin] = $latestVersion;
|
$updateTransient->response[$this->plugin] = $latestVersion;
|
||||||
}
|
}
|
||||||
$updateTransient->lastChecked = time();
|
$updateTransient->last_checked = time(); // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
||||||
$updateTransient->checked[$this->plugin] = $this->version;
|
$updateTransient->checked[$this->plugin] = $this->version;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ class ViewInBrowser {
|
|||||||
public function view($data) {
|
public function view($data) {
|
||||||
$wpUserPreview = (
|
$wpUserPreview = (
|
||||||
($data->subscriber && $data->subscriber->isWPUser() && $data->preview) ||
|
($data->subscriber && $data->subscriber->isWPUser() && $data->preview) ||
|
||||||
($data->preview && $data->newsletterHash)
|
($data->preview && $data->newsletter_hash) // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
||||||
);
|
);
|
||||||
return $this->renderNewsletter(
|
return $this->renderNewsletter(
|
||||||
$data->newsletter,
|
$data->newsletter,
|
||||||
|
@ -38,7 +38,7 @@ class UpdaterTest extends \MailPoetTest {
|
|||||||
|
|
||||||
public function testItChecksForUpdates() {
|
public function testItChecksForUpdates() {
|
||||||
$updateTransient = new \stdClass;
|
$updateTransient = new \stdClass;
|
||||||
$updateTransient->lastChecked = time();
|
$updateTransient->last_checked = time(); // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
||||||
$updater = Stub::construct(
|
$updater = Stub::construct(
|
||||||
$this->updater,
|
$this->updater,
|
||||||
[
|
[
|
||||||
@ -61,7 +61,7 @@ class UpdaterTest extends \MailPoetTest {
|
|||||||
$this
|
$this
|
||||||
);
|
);
|
||||||
$result = $updater->checkForUpdate($updateTransient);
|
$result = $updater->checkForUpdate($updateTransient);
|
||||||
expect($result->lastChecked)->greaterOrEquals($updateTransient->lastChecked);
|
expect($result->last_checked)->greaterOrEquals($updateTransient->last_checked); // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
||||||
expect($result->checked[$this->pluginName])->equals($this->version);
|
expect($result->checked[$this->pluginName])->equals($this->version);
|
||||||
expect($result->response[$this->pluginName]->slug)->equals($this->slug);
|
expect($result->response[$this->pluginName]->slug)->equals($this->slug);
|
||||||
expect($result->response[$this->pluginName]->plugin)->equals($this->pluginName);
|
expect($result->response[$this->pluginName]->plugin)->equals($this->pluginName);
|
||||||
|
@ -48,7 +48,7 @@ class PostsTest extends \MailPoetTest {
|
|||||||
$postId = 10;
|
$postId = 10;
|
||||||
$newsletter = (object)[
|
$newsletter = (object)[
|
||||||
'id' => 2,
|
'id' => 2,
|
||||||
'parent_id' => 1,
|
'parentId' => 1,
|
||||||
'type' => Newsletter::TYPE_WELCOME,
|
'type' => Newsletter::TYPE_WELCOME,
|
||||||
];
|
];
|
||||||
$renderedNewsletter = [
|
$renderedNewsletter = [
|
||||||
|
@ -126,7 +126,7 @@ class ViewInBrowserTest extends \MailPoetTest {
|
|||||||
|
|
||||||
public function testItFailsValidationWhenPreviewIsEnabledButNewsletterHashNotProvided() {
|
public function testItFailsValidationWhenPreviewIsEnabledButNewsletterHashNotProvided() {
|
||||||
$data = (object)$this->browserPreviewData;
|
$data = (object)$this->browserPreviewData;
|
||||||
$data->newsletterHash = false;
|
$data->newsletter_hash = false; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
||||||
$data->preview = true;
|
$data->preview = true;
|
||||||
expect($this->viewInBrowser->_validateBrowserPreviewData($data))->false();
|
expect($this->viewInBrowser->_validateBrowserPreviewData($data))->false();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user