1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-04 20:27:31 +02: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\TestCase;
use Monolog\Logger; use Monolog\Logger;
use Monolog\Handler\MockAMQPExchange;
/** /**
* @covers Monolog\Handler\RotatingFileHandler * @covers Monolog\Handler\RotatingFileHandler
@@ -58,20 +59,3 @@ class AmqpHandlerTest extends TestCase
return new MockAMQPExchange(); 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;
}
}