Conditions | 1 |
Paths | 1 |
Total Lines | 47 |
Code Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function testDebugVariable() |
||
28 | { |
||
29 | $view = new CliDebugView(); |
||
30 | $this->assertEquals( |
||
31 | <<<EOS |
||
32 | Debug (CLIDebugViewTest.php:17 - SilverStripe\Dev\Tests\CLIDebugViewTest::setUp()) |
||
33 | string |
||
34 | |||
35 | |||
36 | EOS |
||
37 | , |
||
38 | $view->debugVariable('string', $this->caller) |
||
39 | ); |
||
40 | |||
41 | $this->assertEquals( |
||
42 | <<<EOS |
||
43 | Debug (CLIDebugViewTest.php:17 - SilverStripe\Dev\Tests\CLIDebugViewTest::setUp()) |
||
44 | key = value |
||
45 | another = text |
||
46 | |||
47 | |||
48 | |||
49 | EOS |
||
50 | , |
||
51 | $view->debugVariable([ 'key' => 'value', 'another' => 'text' ], $this->caller) |
||
52 | ); |
||
53 | |||
54 | $this->assertEquals( |
||
55 | <<<EOS |
||
56 | Debug (CLIDebugViewTest.php:17 - SilverStripe\Dev\Tests\CLIDebugViewTest::setUp()) |
||
57 | SilverStripe\Dev\Tests\DebugViewTest\ObjectWithDebug::debug() custom content |
||
58 | |||
59 | |||
60 | EOS |
||
61 | , |
||
62 | $view->debugVariable(new ObjectWithDebug(), $this->caller) |
||
63 | ); |
||
64 | |||
65 | $this->assertEquals( |
||
66 | <<<EOS |
||
67 | Debug (CLIDebugViewTest.php:17 - SilverStripe\\Dev\\Tests\\CLIDebugViewTest::setUp()) |
||
68 | SilverStripe\\Dev\\Tests\\DebugViewTest\\ObjectWithDebug |
||
69 | |||
70 | |||
71 | EOS |
||
72 | , |
||
73 | $view->debugVariable(ObjectWithDebug::class, $this->caller) |
||
74 | ); |
||
77 |