Use short array syntax

[MAILPOET-2090]
This commit is contained in:
Pavel Dohnal
2019-05-20 13:48:48 +02:00
committed by M. Shull
parent 9f16cb6a5f
commit 5da7110eb6
385 changed files with 40133 additions and 40131 deletions

View File

@@ -12,23 +12,23 @@ class ShortcodesTest extends \MailPoetTest {
function _before() {
parent::_before();
$this->WP_post = wp_insert_post(
array(
[
'post_title' => 'Sample Post',
'post_content' => 'contents',
'post_status' => 'publish',
)
]
);
}
function testItCanReplaceShortcodes() {
$queue = $newsletter = (object)array(
'id' => 1
);
$subscriber = (object)array(
$queue = $newsletter = (object)[
'id' => 1,
];
$subscriber = (object)[
'email' => 'test@xample. com',
'first_name' => 'John',
'last_name' => 'Doe'
);
'last_name' => 'Doe',
];
$rendered_body = '[subscriber:firstname] [subscriber:lastname]';
$result = Shortcodes::process($rendered_body, null, $newsletter, $subscriber, $queue);
expect($result)->equals('John Doe');