-
Notifications
You must be signed in to change notification settings - Fork 566
Expand file tree
/
Copy pathIncludePanelTest.php
More file actions
74 lines (67 loc) · 1.77 KB
/
IncludePanelTest.php
File metadata and controls
74 lines (67 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
declare(strict_types=1);
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
* @link https://cakephp.org CakePHP(tm) Project
* @license https://www.opensource.org/licenses/mit-license.php MIT License
**/
namespace DebugKit\Test\TestCase\Panel;
use Cake\Event\Event;
use Cake\TestSuite\TestCase;
use DebugKit\Panel\IncludePanel;
use PHPUnit\Framework\Attributes\WithoutErrorHandler;
/**
* Class IncludePanelTest
*/
class IncludePanelTest extends TestCase
{
/**
* @var IncludePanel
*/
protected $panel;
/**
* set up
*
* @return void
*/
public function setUp(): void
{
parent::setUp();
$this->deprecated(function () {
$this->panel = new IncludePanel();
});
}
/**
* test shutdown
*
* @return void
*/
#[WithoutErrorHandler]
public function testShutdown()
{
$this->panel->shutdown(new Event('Controller.shutdown'));
$data = $this->panel->data();
$this->assertArrayHasKey('cake', $data);
$this->assertArrayHasKey('app', $data);
$this->assertArrayHasKey('plugins', $data);
$this->assertArrayHasKey('vendor', $data);
$this->assertArrayHasKey('other', $data);
}
/**
* Test that the log panel outputs a summary.
*
* @return void
*/
#[WithoutErrorHandler]
public function testSummary()
{
$total = $this->panel->summary();
$this->assertEquals(5, $total);
}
}