-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace Enqueue\AmqpBunny\Tests; | ||
|
||
use Enqueue\AmqpBunny\AmqpContext; | ||
use Enqueue\AmqpBunny\AmqpSubscriptionConsumer; | ||
use Interop\Queue\PsrSubscriptionConsumer; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class AmqpSubscriptionConsumerTest extends TestCase | ||
{ | ||
public function testShouldImplementPsrSubscriptionConsumerInterface() | ||
{ | ||
$rc = new \ReflectionClass(AmqpSubscriptionConsumer::class); | ||
|
||
$this->assertTrue($rc->implementsInterface(PsrSubscriptionConsumer::class)); | ||
} | ||
|
||
public function testCouldBeConstructedWithAmqpContextAsFirstArgument() | ||
{ | ||
new AmqpSubscriptionConsumer($this->createAmqpContextMock()); | ||
} | ||
|
||
/** | ||
* @return AmqpContext|\PHPUnit_Framework_MockObject_MockObject | ||
*/ | ||
private function createAmqpContextMock() | ||
{ | ||
return $this->createMock(AmqpContext::class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace Enqueue\AmqpExt\Tests; | ||
|
||
use Enqueue\AmqpExt\AmqpContext; | ||
use Enqueue\AmqpExt\AmqpSubscriptionConsumer; | ||
use Interop\Queue\PsrSubscriptionConsumer; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class AmqpSubscriptionConsumerTest extends TestCase | ||
{ | ||
public function testShouldImplementPsrSubscriptionConsumerInterface() | ||
{ | ||
$rc = new \ReflectionClass(AmqpSubscriptionConsumer::class); | ||
|
||
$this->assertTrue($rc->implementsInterface(PsrSubscriptionConsumer::class)); | ||
} | ||
|
||
public function testCouldBeConstructedWithAmqpContextAsFirstArgument() | ||
{ | ||
new AmqpSubscriptionConsumer($this->createAmqpContextMock()); | ||
} | ||
|
||
/** | ||
* @return AmqpContext|\PHPUnit_Framework_MockObject_MockObject | ||
*/ | ||
private function createAmqpContextMock() | ||
{ | ||
return $this->createMock(AmqpContext::class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace Enqueue\AmqpLib\Tests; | ||
|
||
use Enqueue\AmqpLib\AmqpContext; | ||
use Enqueue\AmqpLib\AmqpSubscriptionConsumer; | ||
use Interop\Queue\PsrSubscriptionConsumer; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class AmqpSubscriptionConsumerTest extends TestCase | ||
{ | ||
public function testShouldImplementPsrSubscriptionConsumerInterface() | ||
{ | ||
$rc = new \ReflectionClass(AmqpSubscriptionConsumer::class); | ||
|
||
$this->assertTrue($rc->implementsInterface(PsrSubscriptionConsumer::class)); | ||
} | ||
|
||
public function testCouldBeConstructedWithAmqpContextAsFirstArgument() | ||
{ | ||
new AmqpSubscriptionConsumer($this->createAmqpContextMock()); | ||
} | ||
|
||
/** | ||
* @return AmqpContext|\PHPUnit_Framework_MockObject_MockObject | ||
*/ | ||
private function createAmqpContextMock() | ||
{ | ||
return $this->createMock(AmqpContext::class); | ||
} | ||
} |