DumpTest.php 525 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace League\CLImate\Tests\TerminalObject\Basic;
  3. use League\CLImate\Tests\TestBase;
  4. use Mockery;
  5. class DumpTest extends TestBase
  6. {
  7. /**
  8. * @test
  9. * @doesNotPerformAssertions
  10. */
  11. public function it_can_dump_a_variable()
  12. {
  13. $this->output->shouldReceive("write")->once()->with(Mockery::on(function ($content) {
  14. return (bool) strpos($content, "string(10) \"This thing\"");
  15. }));
  16. $this->shouldHavePersisted();
  17. $this->cli->dump('This thing');
  18. }
  19. }