Code Duplication    Length = 8-8 lines in 2 locations

tests/Collector/TimeDataCollectorTest.php 2 locations

@@ 43-50 (lines=8) @@
40
    /**
41
     * Deliberately high threshold and low ratio - should return a warning result
42
     */
43
    public function testWarningOnSlowRequest()
44
    {
45
        Config::modify()->set(DebugBar::class, 'warn_request_time_seconds', '100');
46
        Config::modify()->set(DebugBar::class, 'warn_warning_ratio', '0.000000001');
47
        $result = $this->collector->getWidgets();
48
        $this->assertSame('warning', $result['time']['warn']);
49
        $this->assertContains('>', $result['time']['tooltip']);
50
    }
51
52
    /**
53
     * Deliberately high threshold and high ratio - should return an "ok" result
@@ 55-62 (lines=8) @@
52
    /**
53
     * Deliberately high threshold and high ratio - should return an "ok" result
54
     */
55
    public function testOkOnNormalRequest()
56
    {
57
        Config::modify()->set(DebugBar::class, 'warn_request_time_seconds', '100');
58
        Config::modify()->set(DebugBar::class, 'warn_warning_ratio', '1');
59
        $result = $this->collector->getWidgets();
60
        $this->assertSame('ok', $result['time']['warn']);
61
        $this->assertContains('<', $result['time']['tooltip']);
62
    }
63
64
    public function testWarningCanBeDisabled()
65
    {