| 123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace Test\Michel\Debug;
- use Michel\Debug\Output\VarDumperOutput\CliVarDumpOutput;
- use Michel\UniTester\TestCase;
- class CliVarDumpOutputTest extends TestCase
- {
- protected function setUp(): void
- {
- // TODO: Implement setUp() method.
- }
- protected function tearDown(): void
- {
- // TODO: Implement tearDown() method.
- }
- protected function execute(): void
- {
- $this->testVarDump();
- }
- public function testVarDump()
- {
- ob_start();
- $cliOutput = new CliVarDumpOutput(function ($dumped) {
- echo $dumped;
- });
- $cliOutput->print("Hello, world!");
- $output = ob_get_clean();
- $this->assertStringContains($output, 'string(13) "Hello, world!"');
- }
- }
|