Skip to content

Commit 22278e4

Browse files
committed
Fix token and tests
1 parent f39892c commit 22278e4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Outbox.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static function tokenize(array $vars = null): string
6868
// If no variables were specified use the defaults for the bundled template
6969
if (is_null($vars))
7070
{
71-
$vars = ['title', 'preview', 'main', 'contact', 'unsubscribe'];
71+
$vars = ['title', 'preview', 'body', 'contact', 'unsubscribe'];
7272
}
7373

7474
$data = [];

tests/unit/LibraryTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@ class LibraryTest extends CIUnitTestCase
3232
protected $data = [
3333
'title' => 'First Email Ever',
3434
'preview' => 'Please do not think this is spam!',
35-
'main' => 'Hey there! Good of you to sign up.<br /> We would like to offer you...',
35+
'body' => 'Hey there! Good of you to sign up.<br /> We would like to offer you...',
3636
'contact' => '[email protected]',
3737
'unsubscribe' => '<a href="https://example.com/unsubscribe">Unsubscribe</a>',
3838
];
3939

4040
public function setUp(): void
4141
{
42+
$this->resetServices();
4243
parent::setUp();
4344

4445
$this->config = config('Outbox');
@@ -66,7 +67,7 @@ public function testTokenizeInjectsTokens()
6667
$result = Outbox::tokenize();
6768

6869
$parser = new FeatureResponse($this->response->setBody($result));
69-
$parser->assertSee('{main}', 'tr');
70+
$parser->assertSee('{body}', 'tr');
7071
}
7172

7273
public function testFromTemplateReturnsEmail()

0 commit comments

Comments
 (0)