1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-02-24 23:12:33 +01:00
php-monolog/tests/Monolog/Handler/AmqpExchangeMock.php

39 lines
747 B
PHP
Raw Normal View History

2012-06-15 14:48:07 +03:00
<?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.
*/
2012-06-15 17:56:19 +03:00
2012-06-15 14:48:07 +03:00
namespace Monolog\Handler;
2012-06-19 22:15:23 +02:00
class AmqpExchangeMock extends \AMQPExchange
2012-06-15 14:48:07 +03:00
{
2012-06-19 22:15:23 +02:00
protected $messages = array();
2012-06-15 17:56:19 +03:00
public function __construct()
{
}
2012-06-15 14:48:07 +03:00
2012-06-15 17:56:19 +03:00
public function publish($message, $routing_key, $params = 0, $attributes = array())
{
2012-06-19 22:15:23 +02:00
$this->messages[] = array($message, $routing_key, $params, $attributes);
2012-06-15 17:56:19 +03:00
return true;
}
2012-06-15 14:48:07 +03:00
2012-06-19 22:15:23 +02:00
public function getMessages()
{
return $this->messages;
}
2012-06-15 17:56:19 +03:00
public function setName($name)
{
return true;
}
2012-06-19 22:15:23 +02:00
}