|
11 | 11 |
|
12 | 12 | namespace Symfony\Bundle\MonologBundle\Tests\DependencyInjection; |
13 | 13 |
|
| 14 | +use Monolog\Logger; |
14 | 15 | use Symfony\Bundle\MonologBundle\DependencyInjection\Configuration; |
15 | 16 | use Symfony\Component\Config\Definition\Processor; |
| 17 | +use Symfony\Component\Console\Output\OutputInterface; |
16 | 18 |
|
17 | 19 | class ConfigurationTest extends \PHPUnit_Framework_TestCase |
18 | 20 | { |
@@ -215,6 +217,34 @@ public function testWithSwiftMailerHandler() |
215 | 217 | $this->assertEquals('mailer', $config['handlers']['swift']['mailer']); |
216 | 218 | } |
217 | 219 |
|
| 220 | + public function testWithConsoleHandler() |
| 221 | + { |
| 222 | + $configs = array( |
| 223 | + array( |
| 224 | + 'handlers' => array( |
| 225 | + 'console' => array( |
| 226 | + 'type' => 'console', |
| 227 | + 'verbosity_levels' => array( |
| 228 | + 'VERBOSITY_NORMAL' => 'NOTICE', |
| 229 | + 'verbosity_verbose' => 'info', |
| 230 | + 'VERBOSITY_very_VERBOSE' => 150 |
| 231 | + ) |
| 232 | + ) |
| 233 | + ) |
| 234 | + ) |
| 235 | + ); |
| 236 | + |
| 237 | + $config = $this->process($configs); |
| 238 | + |
| 239 | + $this->assertSame('console', $config['handlers']['console']['type']); |
| 240 | + $this->assertSame(array( |
| 241 | + OutputInterface::VERBOSITY_NORMAL => Logger::NOTICE, |
| 242 | + OutputInterface::VERBOSITY_VERBOSE => Logger::INFO, |
| 243 | + OutputInterface::VERBOSITY_VERY_VERBOSE => 150, |
| 244 | + OutputInterface::VERBOSITY_DEBUG => Logger::DEBUG |
| 245 | + ), $config['handlers']['console']['verbosity_levels']); |
| 246 | + } |
| 247 | + |
218 | 248 | public function testWithType() |
219 | 249 | { |
220 | 250 | $configs = array( |
|
0 commit comments