Update phpstan to level 5

[MAILPOET-1969]
This commit is contained in:
Pavel Dohnal
2019-04-09 10:16:19 +02:00
committed by M. Shull
parent 5c536b3779
commit 46a0b7501b
6 changed files with 33 additions and 19 deletions

View File

@ -65,14 +65,14 @@ class MailChimpTest extends \MailPoetTest {
if (getenv('WP_TEST_ENABLE_NETWORK_TESTS') !== 'true') return;
try {
$subscribers = $this->mailchimp->getSubscribers();
$this->mailchimp->getSubscribers();
$this->fail('MailChimp getSubscribers() did not throw an exception');
} catch (\Exception $e) {
expect($e->getMessage())->contains('Did not find any valid lists');
}
try {
$subscribers = $this->mailchimp->getSubscribers(array(12));
$this->mailchimp->getSubscribers(array(12));
$this->fail('MailChimp getSubscribers() did not throw an exception');
} catch (\Exception $e) {
expect($e->getMessage())->contains('Did not find any valid lists');
@ -95,18 +95,6 @@ class MailChimpTest extends \MailPoetTest {
expect($subscribers['subscribersCount'])->equals(1);
}
function testItFailsWhenListHeadersDontMatch() {
if (getenv('WP_TEST_ENABLE_NETWORK_TESTS') !== 'true') return;
try {
$subscribers = $this->mailchimp->getSubscribers($this->lists);
$this->fail('MailChimp getSubscribers() did not throw an exception');
} catch (\Exception $e) {
expect($e->getMessage())
->contains('The selected lists do not have matching columns (headers)');
}
}
function testItFailsWhenSubscribersDataTooLarge() {
if (getenv('WP_TEST_ENABLE_NETWORK_TESTS') !== 'true') return;
$mailchimp = clone($this->mailchimp);