Apply rules to tests and tasks
This commit is contained in:
@@ -171,11 +171,12 @@ class WorkerTest extends \MailPoetTest {
|
||||
public function testAddsSubjectToContext() {
|
||||
$this->renderer->expects($this->exactly(2)) // html + text template
|
||||
->method('render')
|
||||
->with(
|
||||
$this->anything(),
|
||||
$this->callback(function($context){
|
||||
->with(
|
||||
$this->anything(),
|
||||
$this->callback(function($context){
|
||||
return $context['subject'] === 'Rendered Email Subject';
|
||||
}));
|
||||
})
|
||||
);
|
||||
|
||||
$this->statsNotifications->process();
|
||||
}
|
||||
@@ -184,10 +185,11 @@ class WorkerTest extends \MailPoetTest {
|
||||
$this->renderer->expects($this->exactly(2)) // html + text template
|
||||
->method('render')
|
||||
->with(
|
||||
$this->anything(),
|
||||
$this->callback(function($context){
|
||||
return $context['preheader'] === '60.00% clicks, 40.00% opens, 20.00% unsubscribes in a nutshell.';
|
||||
}));
|
||||
$this->anything(),
|
||||
$this->callback(function($context){
|
||||
return $context['preheader'] === '60.00% clicks, 40.00% opens, 20.00% unsubscribes in a nutshell.';
|
||||
})
|
||||
);
|
||||
|
||||
$this->statsNotifications->process();
|
||||
}
|
||||
@@ -200,7 +202,8 @@ class WorkerTest extends \MailPoetTest {
|
||||
$this->callback(function($context){
|
||||
return strpos($context['linkSettings'], 'mailpoet-settings')
|
||||
&& strpos($context['linkStats'], 'mailpoet-newsletters&stats');
|
||||
}));
|
||||
})
|
||||
);
|
||||
|
||||
$this->statsNotifications->process();
|
||||
}
|
||||
@@ -213,7 +216,8 @@ class WorkerTest extends \MailPoetTest {
|
||||
$this->callback(function($context){
|
||||
return ($context['topLink'] === 'Link url2')
|
||||
&& ($context['topLinkClicks'] === 2);
|
||||
}));
|
||||
})
|
||||
);
|
||||
|
||||
$this->statsNotifications->process();
|
||||
}
|
||||
@@ -239,7 +243,8 @@ class WorkerTest extends \MailPoetTest {
|
||||
$this->anything(),
|
||||
$this->callback(function($context){
|
||||
return ($context['topLink'] === 'Manage subscription link');
|
||||
}));
|
||||
})
|
||||
);
|
||||
|
||||
$this->statsNotifications->process();
|
||||
}
|
||||
|
Reference in New Issue
Block a user