function RulesDebugLoggerChannelTest::providerTestLog

Data provider for self::testLog().

File

tests/src/Unit/RulesDebugLoggerChannelTest.php, line 147

Class

RulesDebugLoggerChannelTest
@coversDefaultClass \Drupal\rules\Logger\RulesDebugLoggerChannel @group Rules

Namespace

Drupal\Tests\rules\Unit

Code

public function providerTestLog() {
    return [
        [
            'psr3_message_level' => LogLevel::DEBUG,
            'rfc_message_level' => RfcLogLevel::DEBUG,
            'system_debug_enabled' => FALSE,
            'debug_log_enabled' => FALSE,
            'min_psr3_level' => LogLevel::DEBUG,
            'expected_system_logs' => 0,
            'expected_screen_logs' => 0,
            'message' => 'apple',
        ],
        [
            'psr3_message_level' => LogLevel::DEBUG,
            'rfc_message_level' => RfcLogLevel::DEBUG,
            'system_debug_enabled' => FALSE,
            'debug_log_enabled' => TRUE,
            'min_psr3_level' => LogLevel::DEBUG,
            'expected_system_logs' => 0,
            'expected_screen_logs' => 1,
            'message' => 'pear',
        ],
        [
            'psr3_message_level' => LogLevel::CRITICAL,
            'rfc_message_level' => RfcLogLevel::CRITICAL,
            'system_debug_enabled' => TRUE,
            'debug_log_enabled' => FALSE,
            'min_psr3_level' => LogLevel::DEBUG,
            'expected_system_logs' => 1,
            'expected_screen_logs' => 0,
            'message' => 'banana',
        ],
        [
            'psr3_message_level' => LogLevel::CRITICAL,
            'rfc_message_level' => RfcLogLevel::CRITICAL,
            'system_debug_enabled' => TRUE,
            'debug_log_enabled' => TRUE,
            'min_psr3_level' => LogLevel::DEBUG,
            'expected_system_logs' => 1,
            'expected_screen_logs' => 1,
            'message' => 'carrot',
        ],
        [
            'psr3_message_level' => LogLevel::CRITICAL,
            'rfc_message_level' => RfcLogLevel::CRITICAL,
            'system_debug_enabled' => TRUE,
            'debug_log_enabled' => FALSE,
            'min_psr3_level' => LogLevel::DEBUG,
            'expected_system_logs' => 1,
            'expected_screen_logs' => 0,
            'message' => 'orange',
        ],
        [
            'psr3_message_level' => LogLevel::CRITICAL,
            'rfc_message_level' => RfcLogLevel::CRITICAL,
            'system_debug_enabled' => TRUE,
            'debug_log_enabled' => TRUE,
            'min_psr3_level' => LogLevel::DEBUG,
            'expected_system_logs' => 1,
            'expected_screen_logs' => 1,
            'message' => 'kumquat',
        ],
        [
            'psr3_message_level' => LogLevel::INFO,
            'rfc_message_level' => RfcLogLevel::INFO,
            'system_debug_enabled' => TRUE,
            'debug_log_enabled' => FALSE,
            'min_psr3_level' => LogLevel::CRITICAL,
            'expected_system_logs' => 0,
            'expected_screen_logs' => 0,
            'message' => 'cucumber',
        ],
        [
            'psr3_message_level' => LogLevel::INFO,
            'rfc_message_level' => RfcLogLevel::INFO,
            'system_debug_enabled' => TRUE,
            'debug_log_enabled' => TRUE,
            'min_psr3_level' => LogLevel::CRITICAL,
            'expected_system_logs' => 0,
            'expected_screen_logs' => 0,
            'message' => 'dragonfruit',
        ],
    ];
}