Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
a38c280a
Commit
a38c280a
authored
Nov 08, 2013
by
Paul Klimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unit test for 'yii\swiftmailer\Message' fixed.
parent
998cf7e6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
MessageTest.php
tests/unit/extensions/swiftmailer/MessageTest.php
+6
-13
No files found.
tests/unit/extensions/swiftmailer/MessageTest.php
View file @
a38c280a
...
@@ -119,6 +119,8 @@ class MessageTest extends VendorTestCase
...
@@ -119,6 +119,8 @@ class MessageTest extends VendorTestCase
{
{
$charset
=
'utf-16'
;
$charset
=
'utf-16'
;
$subject
=
'Test Subject'
;
$subject
=
'Test Subject'
;
$from
=
'from@somedomain.com'
;
$replyTo
=
'reply-to@somedomain.com'
;
$to
=
'someuser@somedomain.com'
;
$to
=
'someuser@somedomain.com'
;
$cc
=
'ccuser@somedomain.com'
;
$cc
=
'ccuser@somedomain.com'
;
$bcc
=
'bccuser@somedomain.com'
;
$bcc
=
'bccuser@somedomain.com'
;
...
@@ -126,6 +128,8 @@ class MessageTest extends VendorTestCase
...
@@ -126,6 +128,8 @@ class MessageTest extends VendorTestCase
$messageString
=
$this
->
createTestMessage
()
$messageString
=
$this
->
createTestMessage
()
->
setCharset
(
$charset
)
->
setCharset
(
$charset
)
->
setSubject
(
$subject
)
->
setSubject
(
$subject
)
->
setFrom
(
$from
)
->
setReplyTo
(
$replyTo
)
->
setTo
(
$to
)
->
setTo
(
$to
)
->
setCc
(
$cc
)
->
setCc
(
$cc
)
->
setBcc
(
$bcc
)
->
setBcc
(
$bcc
)
...
@@ -133,6 +137,8 @@ class MessageTest extends VendorTestCase
...
@@ -133,6 +137,8 @@ class MessageTest extends VendorTestCase
$this
->
assertContains
(
'charset='
.
$charset
,
$messageString
,
'Incorrect charset!'
);
$this
->
assertContains
(
'charset='
.
$charset
,
$messageString
,
'Incorrect charset!'
);
$this
->
assertContains
(
'Subject: '
.
$subject
,
$messageString
,
'Incorrect "Subject" header!'
);
$this
->
assertContains
(
'Subject: '
.
$subject
,
$messageString
,
'Incorrect "Subject" header!'
);
$this
->
assertContains
(
'From: '
.
$from
,
$messageString
,
'Incorrect "From" header!'
);
$this
->
assertContains
(
'Reply-To: '
.
$replyTo
,
$messageString
,
'Incorrect "Reply-To" header!'
);
$this
->
assertContains
(
'To: '
.
$to
,
$messageString
,
'Incorrect "To" header!'
);
$this
->
assertContains
(
'To: '
.
$to
,
$messageString
,
'Incorrect "To" header!'
);
$this
->
assertContains
(
'Cc: '
.
$cc
,
$messageString
,
'Incorrect "Cc" header!'
);
$this
->
assertContains
(
'Cc: '
.
$cc
,
$messageString
,
'Incorrect "Cc" header!'
);
$this
->
assertContains
(
'Bcc: '
.
$bcc
,
$messageString
,
'Incorrect "Bcc" header!'
);
$this
->
assertContains
(
'Bcc: '
.
$bcc
,
$messageString
,
'Incorrect "Bcc" header!'
);
...
@@ -141,19 +147,6 @@ class MessageTest extends VendorTestCase
...
@@ -141,19 +147,6 @@ class MessageTest extends VendorTestCase
/**
/**
* @depends testGetSwiftMessage
* @depends testGetSwiftMessage
*/
*/
public
function
testSetupFrom
()
{
$from
=
'someuser@somedomain.com'
;
$messageString
=
$this
->
createTestMessage
()
->
setFrom
(
$from
)
->
toString
();
$this
->
assertContains
(
'From: '
.
$from
,
$messageString
,
'Incorrect "From" header!'
);
$this
->
assertContains
(
'Reply-To: '
.
$from
,
$messageString
,
'Incorrect "Reply-To" header!'
);
}
/**
* @depends testGetSwiftMessage
*/
public
function
testSend
()
public
function
testSend
()
{
{
$message
=
$this
->
createTestMessage
();
$message
=
$this
->
createTestMessage
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment