1
0
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:
pomaxa 2012-06-15 14:48:07 +03:00
parent 0932fd33c4
commit 792634384a
2 changed files with 29 additions and 17 deletions

View 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;
}
}

View File

@ -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;
}
}