Skip to content

Commit

Permalink
revert broken table feature
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Feb 14, 2020
1 parent 4be35a5 commit 4094d78
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 228 deletions.
8 changes: 2 additions & 6 deletions src/Illuminate/Console/Concerns/InteractsWithIO.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,11 @@ public function choice($question, array $choices, $default = null, $attempts = n
* @param \Illuminate\Contracts\Support\Arrayable|array $rows
* @param string $tableStyle
* @param array $columnStyles
* @return \Symfony\Component\Console\Helper\Table
* @return void
*/
public function table($headers, $rows, $tableStyle = 'default', array $columnStyles = [])
{
$output = $this->output->getOutput();

$table = new Table($output instanceof ConsoleOutput ? $output->section() : $output);
$table = new Table($this->output);

if ($rows instanceof Arrayable) {
$rows = $rows->toArray();
Expand All @@ -238,8 +236,6 @@ public function table($headers, $rows, $tableStyle = 'default', array $columnSty
}

$table->render();

return $table;
}

/**
Expand Down
10 changes: 0 additions & 10 deletions src/Illuminate/Console/OutputStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,4 @@ public function isDebug()
{
return $this->output->isDebug();
}

/**
* Get the underlying Symfony output implementation.
*
* @return \Symfony\Component\Console\Output\OutputInterface
*/
public function getOutput()
{
return $this->output;
}
}
86 changes: 0 additions & 86 deletions src/Illuminate/Foundation/Testing/MockStream.php

This file was deleted.

19 changes: 0 additions & 19 deletions src/Illuminate/Foundation/Testing/PendingCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
use Mockery;
use Mockery\Exception\NoMatchingExpectationException;
use PHPUnit\Framework\TestCase as PHPUnitTestCase;
use Symfony\Component\Console\Formatter\OutputFormatter;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Console\Output\ConsoleSectionOutput;
use Symfony\Component\Console\Output\Output;

class PendingCommand
Expand Down Expand Up @@ -196,21 +194,6 @@ private function createABufferedOutputMock()
->shouldAllowMockingProtectedMethods()
->shouldIgnoreMissing();

MockStream::register($mock);

$stream = fopen('mock://stream', 'r+');

$consoleOutputSections = [];

$mock->shouldReceive('section')
->andReturn(new ConsoleSectionOutput(
$stream,
$consoleOutputSections,
Output::VERBOSITY_NORMAL,
false,
new OutputFormatter)
);

foreach ($this->test->expectedOutput as $i => $output) {
$mock->shouldReceive('doWrite')
->once()
Expand All @@ -236,7 +219,5 @@ public function __destruct()
}

$this->run();

MockStream::restore();
}
}
44 changes: 0 additions & 44 deletions tests/Foundation/Testing/MockStreamTest.php

This file was deleted.

63 changes: 0 additions & 63 deletions tests/Integration/Console/CommandWithTableTest.php

This file was deleted.

0 comments on commit 4094d78

Please sign in to comment.