-
Notifications
You must be signed in to change notification settings - Fork 52
Add the 3.x Patch #125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the 3.x Patch #125
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: build | ||
|
|
||
| on: [push, pull_request] | ||
|
|
||
| jobs: | ||
| run: | ||
| runs-on: ${{ matrix.operating-system }} | ||
| strategy: | ||
| matrix: | ||
| operating-system: [ubuntu-latest] | ||
| php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1'] | ||
| name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v1 | ||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: ${{ matrix.php-versions }} | ||
| extensions: mbstring, intl, zip, xml | ||
| coverage: none | ||
|
|
||
| - name: Install dependencies | ||
| run: composer install -n | ||
|
|
||
| - name: Run test suite | ||
| run: vendor/bin/phpunit --exclude-group github_action | ||
|
|
||
| - name: Run demo script | ||
| run: example/demo meta --zsh commit arg 0 suggestions && example/demo meta --zsh commit arg 1 valid-values && example/demo zsh --bind demo > zsh |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -128,6 +128,9 @@ private function getNumberOfColumns() | |
|
|
||
| $columns = array(count($this->headers)); | ||
| foreach ($this->rows as $row) { | ||
| if (!is_array($row)) { | ||
| $row = []; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
| $columns[] = count($row); | ||
| } | ||
| return $this->numberOfColumns = max($columns); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ | |
| namespace CLIFramework; | ||
| use GetOptionKit\OptionCollection; | ||
| use GetOptionKit\Option; | ||
| use GetOptionKit\OptionPrinter\OptionPrinterInterface; | ||
| use GetOptionKit\OptionPrinter\OptionPrinter as OptionPrinterInterface; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| use CLIFramework\Formatter; | ||
|
|
||
| class OptionPrinter implements OptionPrinterInterface | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| <?php | ||
| namespace CLIFramework\Testing; | ||
|
|
||
| class ConsoleTestCase extends \PHPUnit_Framework_TestCase | ||
| use PHPUnit\Framework\TestCase; | ||
|
|
||
| class ConsoleTestCase extends TestCase | ||
| { | ||
| protected function runScript($path, $input, $callback) | ||
| { | ||
|
|
@@ -21,7 +23,7 @@ protected function runScript($path, $input, $callback) | |
| @fclose($pipes[0]); | ||
| @fclose($pipes[1]); | ||
| @fclose($pipes[2]); | ||
| @pclose($process); | ||
| @proc_close($process); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| $callback($content); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,8 +8,9 @@ | |
| use CLIFramework\Component\Table\CurrencyCellAttribute; | ||
| use CLIFramework\Component\Table\SpellOutNumberFormatCell; | ||
| use CLIFramework\Component\Table\RowSeparator; | ||
| use PHPUnit\Framework\TestCase; | ||
|
|
||
| class TableTest extends PHPUnit_Framework_TestCase | ||
| class TableTest extends TestCase | ||
| { | ||
|
|
||
| public function testNumberFormatCell() | ||
|
|
@@ -181,7 +182,7 @@ public function testMarkdownTable() | |
| $this->assertStringEqualsFile('tests/data/markdown-table.txt', $out); | ||
| } | ||
|
|
||
| static public function assertStringEqualsFile($file, $str, $message = NULL, $canonicalize = false, $ignoreCase = false) { | ||
| public static function assertStringEqualsFile($file, $str, $message = NULL, $canonicalize = false, $ignoreCase = false): void { | ||
| if ($str instanceof Table) { | ||
| $str = $str->render(); | ||
| } | ||
|
|
@@ -190,7 +191,7 @@ static public function assertStringEqualsFile($file, $str, $message = NULL, $can | |
| echo "Actual:\n"; | ||
| echo $str , "\n"; | ||
| } | ||
| parent::assertStringEqualsFile($file, $str, $message, $canonicalize, $ignoreCase); | ||
| parent::assertStringEqualsFile($file, $str, (string)$message, $canonicalize, $ignoreCase); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
|
|
||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.