mirror of
https://github.com/Seldaek/monolog.git
synced 2025-02-23 06:22:47 +01:00
AMQP mock object
This commit is contained in:
parent
0932fd33c4
commit
792634384a
28
tests/Monolog/Handler/AmqpExchangeMock.php
Normal file
28
tests/Monolog/Handler/AmqpExchangeMock.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Monolog package.
|
||||
*
|
||||
* (c) Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace Monolog\Handler;
|
||||
|
||||
class MockAMQPExchange extends \AMQPExchange
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
public function publish($message, $routing_key, $params = 0, $attributes = array())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function setName($name)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
@ -13,6 +13,7 @@ namespace Monolog\Handler;
|
||||
|
||||
use Monolog\TestCase;
|
||||
use Monolog\Logger;
|
||||
use Monolog\Handler\MockAMQPExchange;
|
||||
|
||||
/**
|
||||
* @covers Monolog\Handler\RotatingFileHandler
|
||||
@ -57,21 +58,4 @@ class AmqpHandlerTest extends TestCase
|
||||
*/
|
||||
return new MockAMQPExchange();
|
||||
}
|
||||
}
|
||||
|
||||
class MockAMQPExchange extends \AMQPExchange
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
public function publish($message, $routing_key, $params = 0, $attributes = array())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function setName($name)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user