File tree Expand file tree Collapse file tree 9 files changed +18
-38
lines changed
Expand file tree Collapse file tree 9 files changed +18
-38
lines changed Original file line number Diff line number Diff line change 22vendor
33. * .swp
44composer.lock
5+ .phpunit.result.cache
Original file line number Diff line number Diff line change 11<?php
22
3- require dirname ( dirname ( __FILE__ ) ) . '/lib/cli/cli.php ' ;
4-
5- /**
6- * Compatibility with PHPUnit 6+
7- */
8- if ( class_exists ( 'PHPUnit\Runner\Version ' ) ) {
9- require_once dirname ( __FILE__ ) . '/phpunit6-compat.php ' ;
10- }
113
124function cli_autoload ( $ className ) {
135 $ className = ltrim ($ className , '\\' );
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11<?php
22
33use cli \Arguments ;
4+ use PHPUnit \Framework \TestCase ;
45
56/**
67 * Class TestArguments
78 * @todo add more tests to increase coverage
89 *
910 * @backupGlobals enabled
1011 */
11- class TestArguments extends PHPUnit_Framework_TestCase
12+ class TestArguments extends TestCase
1213{
1314 /**
1415 * Array of expected settings
@@ -58,7 +59,7 @@ public static function pushToArgv($args)
5859 /**
5960 * Set up valid flags and options
6061 */
61- public function setUp ()
62+ public function setUp (): void
6263 {
6364 self ::clearArgv ();
6465 self ::pushToArgv ('my_script.php ' );
@@ -95,7 +96,7 @@ public function setUp()
9596 /**
9697 * Tear down fixtures
9798 */
98- public function tearDown ()
99+ public function tearDown (): void
99100 {
100101 $ this ->flags = null ;
101102 $ this ->options = null ;
Original file line number Diff line number Diff line change 22
33use cli \Colors ;
44
5- class testsCli extends PHPUnit_Framework_TestCase {
5+ use PHPUnit \Framework \TestCase ;
6+ class testsCli extends TestCase {
67
7- function setUp () {
8+ function setUp (): void {
89 // Reset enable state
910 \cli \Colors::enable ( null );
1011
Original file line number Diff line number Diff line change 11<?php
22
33use cli \Colors ;
4+ use PHPUnit \Framework \TestCase ;
45
5- class testsColors extends PHPUnit_Framework_TestCase {
6+ class testsColors extends TestCase {
67
78 /**
89 * @dataProvider dataColors
Original file line number Diff line number Diff line change 11<?php
22
33use cli \Shell ;
4+ use PHPUnit \Framework \TestCase ;
45
56/**
67 * Class TestShell
78 */
8- class TestShell extends PHPUnit_Framework_TestCase {
9+ class TestShell extends TestCase {
910
1011 /**
1112 * Test getting TERM columns.
Original file line number Diff line number Diff line change 44use cli \Table ;
55use cli \table \Ascii ;
66use cli \Colors ;
7+ use PHPUnit \Framework \TestCase ;
78
89/**
910 * Class Test_Table_Ascii
1011 *
1112 * Acceptance tests for ASCII table drawing.
1213 * It will redirect STDOUT to temporary file and check that output matches with expected
1314 */
14- class Test_Table_Ascii extends PHPUnit_Framework_TestCase {
15+ class Test_Table_Ascii extends TestCase {
1516 /**
1617 * @var string Path to temporary file, where STDOUT output will be redirected during tests
1718 */
@@ -24,7 +25,7 @@ class Test_Table_Ascii extends PHPUnit_Framework_TestCase {
2425 /**
2526 * Creates instance and redirects STDOUT to temporary file
2627 */
27- public function setUp () {
28+ public function setUp (): void {
2829 $ this ->_mockFile = tempnam (sys_get_temp_dir (), 'temp ' );
2930 $ resource = fopen ($ this ->_mockFile , 'wb ' );
3031 Streams::setStream ('out ' , $ resource );
@@ -36,7 +37,7 @@ public function setUp() {
3637 /**
3738 * Cleans temporary file
3839 */
39- public function tearDown () {
40+ public function tearDown (): void {
4041 if (file_exists ($ this ->_mockFile )) {
4142 unlink ($ this ->_mockFile );
4243 }
Original file line number Diff line number Diff line change 11<?php
22
33use cli \Colors , cli \Table , cli \Table \Ascii ;
4+ use PHPUnit \Framework \TestCase ;
45
56/**
67 * Tests for cli\Table
78 */
8- class Test_Table extends PHPUnit_Framework_TestCase {
9+ class Test_Table extends TestCase {
910
1011 public function test_column_value_too_long_ascii () {
1112
You can’t perform that action at this time.
0 commit comments