output->shouldReceive("write")->once()->with(Mockery::on(function ($content) { return (bool) strpos($content, "string(10) \"This thing\""); })); $this->shouldHavePersisted(); $this->cli->dump('This thing'); } }