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
ad7761f9
Commit
ad7761f9
authored
Nov 06, 2013
by
Paul Klimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Method 'yii\mail\MessageInterface::compose()' renamed to 'yii\mail\MessageInterface::message()'.
parent
3d1a625c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
11 deletions
+11
-11
Mailer.php
extensions/swiftmailer/yii/swiftmailer/Mailer.php
+1
-1
BaseMailer.php
framework/yii/mail/BaseMailer.php
+1
-1
MailerInterface.php
framework/yii/mail/MailerInterface.php
+1
-1
MessageTest.php
tests/unit/extensions/swiftmailer/MessageTest.php
+1
-1
BaseMailerTest.php
tests/unit/framework/mail/BaseMailerTest.php
+4
-4
BaseMessageTest.php
tests/unit/framework/mail/BaseMessageTest.php
+3
-3
No files found.
extensions/swiftmailer/yii/swiftmailer/Mailer.php
View file @
ad7761f9
...
...
@@ -36,7 +36,7 @@ use Yii;
*
* @see http://swiftmailer.org
*
* @method Message
compos
e(array $config = []) creates new message instance from given configuration.
* @method Message
messag
e(array $config = []) creates new message instance from given configuration.
*
* @author Paul Klimov <klimov.paul@gmail.com>
* @since 2.0
...
...
framework/yii/mail/BaseMailer.php
View file @
ad7761f9
...
...
@@ -118,7 +118,7 @@ abstract class BaseMailer extends Component implements MailerInterface, ViewCont
* for the configuration format details.
* @return MessageInterface message instance.
*/
public
function
compos
e
(
array
$config
=
[])
public
function
messag
e
(
array
$config
=
[])
{
$config
=
array_merge
(
$this
->
messageConfig
,
$config
);
if
(
!
array_key_exists
(
'class'
,
$config
))
{
...
...
framework/yii/mail/MailerInterface.php
View file @
ad7761f9
...
...
@@ -22,7 +22,7 @@ interface MailerInterface
* @param array $config message configuration.
* @return MessageInterface message instance.
*/
public
function
compos
e
(
array
$config
=
[]);
public
function
messag
e
(
array
$config
=
[]);
/**
* Sends the given email message.
...
...
tests/unit/extensions/swiftmailer/MessageTest.php
View file @
ad7761f9
...
...
@@ -63,7 +63,7 @@ class MessageTest extends VendorTestCase
*/
protected
function
createTestMessage
()
{
return
Yii
::
$app
->
getComponent
(
'mail'
)
->
compos
e
();
return
Yii
::
$app
->
getComponent
(
'mail'
)
->
messag
e
();
}
/**
...
...
tests/unit/framework/mail/BaseMailerTest.php
View file @
ad7761f9
...
...
@@ -96,7 +96,7 @@ class BaseMailerTest extends TestCase
public
function
testComposeMessage
()
{
$mailer
=
new
Mailer
();
$message
=
$mailer
->
compos
e
();
$message
=
$mailer
->
messag
e
();
$this
->
assertTrue
(
is_object
(
$message
),
'Unable to create message instance!'
);
$this
->
assertEquals
(
$mailer
->
messageClass
,
get_class
(
$message
),
'Invalid message class!'
);
...
...
@@ -104,7 +104,7 @@ class BaseMailerTest extends TestCase
'id'
=>
'test-id'
,
'encoding'
=>
'test-encoding'
,
);
$message
=
$mailer
->
compos
e
(
$messageConfig
);
$message
=
$mailer
->
messag
e
(
$messageConfig
);
foreach
(
$messageConfig
as
$name
=>
$value
)
{
$this
->
assertEquals
(
$value
,
$message
->
$name
,
'Unable to apply message config!'
);
...
...
@@ -135,7 +135,7 @@ class BaseMailerTest extends TestCase
$messageConfig
=
array_merge
(
$notPropertyConfig
,
$propertyConfig
);
$mailer
->
messageConfig
=
$messageConfig
;
$message
=
$mailer
->
compos
e
();
$message
=
$mailer
->
messag
e
();
foreach
(
$notPropertyConfig
as
$name
=>
$value
)
{
$this
->
assertEquals
(
$value
,
$message
->
{
'_'
.
$name
});
...
...
@@ -181,7 +181,7 @@ class BaseMailerTest extends TestCase
$messageConfig
=
array
(
'renderText'
=>
[
$viewName
],
);
$message
=
$mailer
->
compos
e
(
$messageConfig
);
$message
=
$mailer
->
messag
e
(
$messageConfig
);
$this
->
assertEquals
(
$viewFileContent
,
$message
->
_text
);
}
...
...
tests/unit/framework/mail/BaseMessageTest.php
View file @
ad7761f9
...
...
@@ -43,7 +43,7 @@ class BaseMessageTest extends TestCase
public
function
testRender
()
{
$mailer
=
$this
->
getMailer
();
$message
=
$mailer
->
compos
e
();
$message
=
$mailer
->
messag
e
();
$viewName
=
'test/text/view'
;
$message
->
renderText
(
$viewName
);
...
...
@@ -62,7 +62,7 @@ class BaseMessageTest extends TestCase
public
function
testComposeBody
()
{
$mailer
=
$this
->
getMailer
();
$message
=
$mailer
->
compos
e
();
$message
=
$mailer
->
messag
e
();
$viewName
=
'test/html/view'
;
$message
->
renderBody
(
$viewName
);
...
...
@@ -83,7 +83,7 @@ class BaseMessageTest extends TestCase
public
function
testSend
()
{
$mailer
=
$this
->
getMailer
();
$message
=
$mailer
->
compos
e
();
$message
=
$mailer
->
messag
e
();
$message
->
send
();
$this
->
assertEquals
(
$message
,
$mailer
->
sentMessages
[
0
],
'Unable to send message!'
);
}
...
...
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