update namespace

This commit is contained in:
KHOUBZA Younes
2020-12-03 09:15:47 +01:00
parent 03895823a5
commit 26d4ca787f
80 changed files with 582 additions and 313 deletions
+18 -18
View File
@@ -2,15 +2,15 @@
namespace Flasher\Prime\Tests\Envelope;
use Notify\Envelope;
use Flasher\Prime\Envelope;
use PHPUnit\Framework\TestCase;
final class EnvelopeTest extends TestCase
{
public function testConstruct()
{
$notification = $this->getMockBuilder('Flasher\Prime\TestsNotification\NotificationInterface')->getMock();
$stamp = $this->getMockBuilder('Flasher\Prime\TestsStamp\StampInterface')->getMock();
$notification = $this->getMockBuilder('Flasher\Prime\Notification\NotificationInterface')->getMock();
$stamp = $this->getMockBuilder('Flasher\Prime\Stamp\StampInterface')->getMock();
$envelope = new Envelope($notification, array($stamp));
@@ -20,9 +20,9 @@ final class EnvelopeTest extends TestCase
public function testWith()
{
$notification = $this->getMockBuilder('Flasher\Prime\TestsNotification\NotificationInterface')->getMock();
$stamp1 = $this->getMockBuilder('Flasher\Prime\TestsStamp\StampInterface')->getMock();
$stamp2 = $this->getMockBuilder('Flasher\Prime\TestsStamp\StampInterface')->getMock();
$notification = $this->getMockBuilder('Flasher\Prime\Notification\NotificationInterface')->getMock();
$stamp1 = $this->getMockBuilder('Flasher\Prime\Stamp\StampInterface')->getMock();
$stamp2 = $this->getMockBuilder('Flasher\Prime\Stamp\StampInterface')->getMock();
$envelope = new Envelope($notification);
$envelope->with($stamp1, $stamp2);
@@ -33,8 +33,8 @@ final class EnvelopeTest extends TestCase
public function testWrap()
{
$notification = $this->getMockBuilder('Flasher\Prime\TestsNotification\NotificationInterface')->getMock();
$stamp = $this->getMockBuilder('Flasher\Prime\TestsStamp\StampInterface')->getMock();
$notification = $this->getMockBuilder('Flasher\Prime\Notification\NotificationInterface')->getMock();
$stamp = $this->getMockBuilder('Flasher\Prime\Stamp\StampInterface')->getMock();
$envelope = Envelope::wrap($notification, array($stamp));
@@ -44,12 +44,12 @@ final class EnvelopeTest extends TestCase
public function testAll()
{
$notification = $this->getMockBuilder('Flasher\Prime\TestsNotification\NotificationInterface')->getMock();
$notification = $this->getMockBuilder('Flasher\Prime\Notification\NotificationInterface')->getMock();
$stamps = array(
$this->getMockBuilder('Flasher\Prime\TestsStamp\StampInterface')->getMock(),
$this->getMockBuilder('Flasher\Prime\TestsStamp\StampInterface')->getMock(),
$this->getMockBuilder('Flasher\Prime\TestsStamp\StampInterface')->getMock(),
$this->getMockBuilder('Flasher\Prime\TestsStamp\StampInterface')->getMock(),
$this->getMockBuilder('Flasher\Prime\Stamp\StampInterface')->getMock(),
$this->getMockBuilder('Flasher\Prime\Stamp\StampInterface')->getMock(),
$this->getMockBuilder('Flasher\Prime\Stamp\StampInterface')->getMock(),
$this->getMockBuilder('Flasher\Prime\Stamp\StampInterface')->getMock(),
);
$envelope = new Envelope($notification, $stamps);
@@ -60,14 +60,14 @@ final class EnvelopeTest extends TestCase
public function testGet()
{
$notification = $this->getMockBuilder('\Flasher\Prime\TestsNotification\NotificationInterface')->getMock();
$notification = $this->getMockBuilder('\Flasher\Prime\Notification\NotificationInterface')->getMock();
$stamps = array(
$this->getMockBuilder('Flasher\Prime\TestsStamp\StampInterface')->getMock(),
$this->getMockBuilder('Flasher\Prime\TestsStamp\StampInterface')->getMock(),
$this->getMockBuilder('Flasher\Prime\TestsStamp\StampInterface')->getMock(),
$this->getMockBuilder('Flasher\Prime\Stamp\StampInterface')->getMock(),
$this->getMockBuilder('Flasher\Prime\Stamp\StampInterface')->getMock(),
$this->getMockBuilder('Flasher\Prime\Stamp\StampInterface')->getMock(),
);
$envelope = new \Notify\Envelope($notification, $stamps);
$envelope = new \Flasher\Prime\Envelope($notification, $stamps);
$this->assertSame($notification, $envelope->getNotification());