Skip to content

Commit

Permalink
Merge branch '2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
crynobone committed Dec 30, 2013
2 parents 6c1ef04 + 4ce9cec commit 704aeb3
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
10 changes: 5 additions & 5 deletions src/Orchestra/Notifier/LaravelNotifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ public function __construct(IlluminateMailer $mailer)
/**
* Send notification via API.
*
* @param NotifiableInterface $user
* @param string $subject
* @param string|array $view
* @param array $data
* @param UserProviderInterface $user
* @param string $subject
* @param string|array $view
* @param array $data
* @return boolean
*/
public function send(NotifiableInterface $user, $subject, $view, array $data = array())
public function send(UserProviderInterface $user, $subject, $view, array $data = array())
{
$sent = $this->mailer->send($view, $data, function ($mail) use ($user, $subject) {
$mail->to($user->getNotifierEmail(), $user->getNotifierName());
Expand Down
10 changes: 5 additions & 5 deletions src/Orchestra/Notifier/NotifierInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ interface NotifierInterface
/**
* Send notification via API.
*
* @param NotifiableInterface $user
* @param string $subject
* @param string|array $view
* @param array $data
* @param UserProviderInterface $user
* @param string $subject
* @param string|array $view
* @param array $data
* @return boolean
*/
public function send(NotifiableInterface $user, $subject, $view, array $data = array());
public function send(UserProviderInterface $user, $subject, $view, array $data = array());
}
10 changes: 5 additions & 5 deletions src/Orchestra/Notifier/OrchestraNotifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ public function __construct(Mailer $mailer)
/**
* Send notification via API.
*
* @param NotifiableInterface $user
* @param string $subject
* @param string|array $view
* @param array $data
* @param UserProviderInterface $user
* @param string $subject
* @param string|array $view
* @param array $data
* @return boolean
*/
public function send(NotifiableInterface $user, $subject, $view, array $data = array())
public function send(UserProviderInterface $user, $subject, $view, array $data = array())
{
$sent = $this->mailer->push($view, $data, function ($message) use ($user, $subject) {
$message->to($user->getNotifierEmail(), $user->getNotifierName());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php namespace Orchestra\Notifier;

interface NotifiableInterface
interface UserProviderInterface
{
/**
* Get the e-mail address where notification are sent.
Expand Down
4 changes: 2 additions & 2 deletions tests/LaravelNotifierTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function tearDown()
public function testSendMethodSucceed()
{
$mailer = m::mock('\Illuminate\Mail\Mailer[send]');
$user = m::mock('\Orchestra\Notifier\NotifiableInterface');
$user = m::mock('\Orchestra\Notifier\UserProviderInterface');
$subject = 'foobar';
$view = 'foo.bar';
$data = array();
Expand Down Expand Up @@ -52,7 +52,7 @@ public function testSendMethodSucceed()
public function testSendMethodFailed()
{
$mailer = m::mock('\Illuminate\Mail\Mailer[send]');
$user = m::mock('\Orchestra\Notifier\NotifiableInterface');
$user = m::mock('\Orchestra\Notifier\UserProviderInterface');
$subject = 'foobar';
$view = 'foo.bar';
$data = array();
Expand Down
6 changes: 3 additions & 3 deletions tests/OrchestraNotifierTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function tearDown()
public function testSendMethodWithoutQueue()
{
$mailer = m::mock('\Orchestra\Notifier\Mailer[push]');
$user = m::mock('\Orchestra\Notifier\NotifiableInterface');
$user = m::mock('\Orchestra\Notifier\UserProviderInterface');
$subject = 'foobar';
$view = 'foo.bar';
$data = array();
Expand Down Expand Up @@ -54,7 +54,7 @@ public function testSendMethodUsingQueue()
{
$mailer = m::mock('\Orchestra\Notifier\Mailer[push]');
$memory = m::mock('\Orchestra\Memory\Provider[get]');
$user = m::mock('\Orchestra\Notifier\NotifiableInterface');
$user = m::mock('\Orchestra\Notifier\UserProviderInterface');
$subject = 'foobar';
$view = 'foo.bar';
$data = array();
Expand Down Expand Up @@ -86,7 +86,7 @@ public function testSendMethodUsingQueue()
public function testSendMethodFailed()
{
$mailer = m::mock('\Orchestra\Notifier\Mailer[push]');
$user = m::mock('\Orchestra\Notifier\NotifiableInterface');
$user = m::mock('\Orchestra\Notifier\UserProviderInterface');
$subject = 'foobar';
$view = 'foo.bar';
$data = array();
Expand Down

0 comments on commit 704aeb3

Please sign in to comment.