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
|
||||
$updateTransient->response[$this->plugin] = $latestVersion;
|
||||
}
|
||||
$updateTransient->lastChecked = time();
|
||||
$updateTransient->last_checked = time(); // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
||||
$updateTransient->checked[$this->plugin] = $this->version;
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@ class ViewInBrowser {
|
||||
public function view($data) {
|
||||
$wpUserPreview = (
|
||||
($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(
|
||||
$data->newsletter,
|
||||
|
@@ -38,7 +38,7 @@ class UpdaterTest extends \MailPoetTest {
|
||||
|
||||
public function testItChecksForUpdates() {
|
||||
$updateTransient = new \stdClass;
|
||||
$updateTransient->lastChecked = time();
|
||||
$updateTransient->last_checked = time(); // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
||||
$updater = Stub::construct(
|
||||
$this->updater,
|
||||
[
|
||||
@@ -61,7 +61,7 @@ class UpdaterTest extends \MailPoetTest {
|
||||
$this
|
||||
);
|
||||
$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->response[$this->pluginName]->slug)->equals($this->slug);
|
||||
expect($result->response[$this->pluginName]->plugin)->equals($this->pluginName);
|
||||
|
@@ -48,7 +48,7 @@ class PostsTest extends \MailPoetTest {
|
||||
$postId = 10;
|
||||
$newsletter = (object)[
|
||||
'id' => 2,
|
||||
'parent_id' => 1,
|
||||
'parentId' => 1,
|
||||
'type' => Newsletter::TYPE_WELCOME,
|
||||
];
|
||||
$renderedNewsletter = [
|
||||
|
@@ -126,7 +126,7 @@ class ViewInBrowserTest extends \MailPoetTest {
|
||||
|
||||
public function testItFailsValidationWhenPreviewIsEnabledButNewsletterHashNotProvided() {
|
||||
$data = (object)$this->browserPreviewData;
|
||||
$data->newsletterHash = false;
|
||||
$data->newsletter_hash = false; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
||||
$data->preview = true;
|
||||
expect($this->viewInBrowser->_validateBrowserPreviewData($data))->false();
|
||||
}
|
||||
|
Reference in New Issue
Block a user