Use correct field names when mocking plugin information in a test
[MAILPOET-2635]
This commit is contained in:
committed by
Jack Kitterhing
parent
fe6a383f36
commit
d955a9105a
@@ -43,19 +43,19 @@ class InstallerTest extends \MailPoetTest {
|
||||
'retrievePluginInformation' => function () {
|
||||
$obj = new \stdClass();
|
||||
$obj->slug = $this->slug;
|
||||
$obj->pluginName = 'MailPoet Premium';
|
||||
$obj->newVersion = '3.0.0-alpha.0.0.3.1';
|
||||
$obj->name = 'MailPoet Premium';
|
||||
$obj->new_version = '3.0.0-alpha.0.0.3.1'; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
||||
$obj->requires = '4.6';
|
||||
$obj->tested = '4.7.4';
|
||||
$obj->downloaded = 12540;
|
||||
$obj->lastUpdated = date('Y-m-d');
|
||||
$obj->last_updated = date('Y-m-d'); // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
||||
$obj->sections = [
|
||||
'description' => 'The new version of the Premium plugin',
|
||||
'another_section' => 'This is another section',
|
||||
'changelog' => 'Some new features',
|
||||
];
|
||||
$obj->downloadLink = home_url() . '/wp-content/uploads/mailpoet-premium.zip';
|
||||
$obj->package = $obj->downloadLink;
|
||||
$obj->download_link = home_url() . '/wp-content/uploads/mailpoet-premium.zip'; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
||||
$obj->package = $obj->download_link; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
||||
return $obj;
|
||||
},
|
||||
],
|
||||
@@ -63,8 +63,8 @@ class InstallerTest extends \MailPoetTest {
|
||||
);
|
||||
$result = $installer->getPluginInformation(false, 'plugin_information', $args);
|
||||
expect($result->slug)->equals($this->slug);
|
||||
expect($result->newVersion)->notEmpty();
|
||||
expect($result->downloadLink)->notEmpty();
|
||||
expect($result->new_version)->notEmpty(); // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
||||
expect($result->download_link)->notEmpty(); // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
|
||||
expect($result->package)->notEmpty();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user