wiki.techinc.nl/tests/phpunit/unit/includes/debug/logger/monolog/CeeFormatterTest.php
Amir Sarabadani 06f645c453 Load GlobalFunctions.php to tests/phpunit/bootstrap.php
That mostly enables testing global functions

Bug: T87781
Change-Id: Ib42c56a67926ebcdba53f4c6c54a5bff98cb77a3
2019-07-14 01:28:07 +02:00

20 lines
637 B
PHP

<?php
namespace MediaWiki\Logger\Monolog;
/**
* Flay per https://phabricator.wikimedia.org/T218688.
*
* @group Broken
* @covers \MediaWiki\Logger\Monolog\CeeFormatter
*/
class CeeFormatterTest extends \MediaWikiUnitTestCase {
public function testV1() {
$ls_formatter = new LogstashFormatter( 'app', 'system', null, 'ctx_', LogstashFormatter::V1 );
$cee_formatter = new CeeFormatter( 'app', 'system', null, 'ctx_', LogstashFormatter::V1 );
$record = [ 'extra' => [ 'url' => 1 ], 'context' => [ 'url' => 2 ] ];
$this->assertSame(
$cee_formatter->format( $record ),
"@cee: " . $ls_formatter->format( $record ) );
}
}