• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ProjektAdLer / MoodlePluginLocalLogging / 12364190631

16 Dec 2024 10:44PM UTC coverage: 93.651% (+3.3%) from 90.323%
12364190631

push

github

Glutamat42
fix test namespaces, add mtrace output module, always use mtrace output module

3 of 4 new or added lines in 2 files covered. (75.0%)

59 of 63 relevant lines covered (93.65%)

3.62 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.33
/classes/hook_listener.php
1
<?php
2

3
namespace local_logging;
4

5
use core\di;
6
use core\hook\di_configuration;
7
use local_logging\local\output\log_output;
8
use local_logging\local\output\log_output_db;
9
use local_logging\local\output\log_output_mtrace;
10
use local_logging\local\output\log_output_stdout;
11

12
class hook_listener {
13
    public static function inject_dependencies(di_configuration $hook): void {
14
        $hook->add_definition(
15✔
15
            id: log_output::class,
15✔
16
            definition: function (): log_output {
15✔
NEW
17
                return di::get(log_output_mtrace::class);
×
18
//                if (defined('CLI_SCRIPT') || defined('PHPUNIT_TEST')) {
19
//                    return new log_output_stdout();
20
//                    return di::get(log_output_mtrace::class);
21
//                } else {
22
//                    return di::get(log_output_db::class);
23
//                }
24
            }
15✔
25
        );
15✔
26
    }
27
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc