Code Duplication    Length = 12-13 lines in 2 locations

tests/unit/PhpQuickProfilerTest.php 2 locations

@@ 75-87 (lines=13) @@
72
        $this->assertAttributeSame($display, 'display', $profiler);
73
    }
74
75
    public function testGatherFileData()
76
    {
77
        $files = get_included_files();
78
        $profiler = new PhpQuickProfiler();
79
        $gatheredFileData = $profiler->gatherFileData();
80
81
        foreach ($gatheredFileData as $fileData) {
82
            $this->assertArrayHasKey('name', $fileData);
83
            $this->assertContains($fileData['name'], $files);
84
            $this->assertArrayHasKey('size', $fileData);
85
            $this->assertEquals($fileData['size'], filesize($fileData['name']));
86
        }
87
    }
88
89
    public function testGatherMemoryData()
90
    {
@@ 89-100 (lines=12) @@
86
        }
87
    }
88
89
    public function testGatherMemoryData()
90
    {
91
        $memory_usage = memory_get_peak_usage();
92
        $allowed_limit = ini_get('memory_limit');
93
        $profiler = new PhpQuickProfiler();
94
        $gatheredMemoryData = $profiler->gatherMemoryData();
95
96
        $this->assertArrayHasKey('used', $gatheredMemoryData);
97
        $this->assertEquals($memory_usage, $gatheredMemoryData['used']);
98
        $this->assertArrayHasKey('allowed', $gatheredMemoryData);
99
        $this->assertEquals($allowed_limit, $gatheredMemoryData['allowed']);
100
    }
101
102
    public function testSetProfiledQueries()
103
    {