Skip to content

Commit

Permalink
Up lowes PHPUnit version to 4.8.36 (first supports PHPUnit 6 FC). Rew…
Browse files Browse the repository at this point in the history
…rite tests to use PHPUnit in 6.x style instead of 4.x
  • Loading branch information
VolCh committed Oct 22, 2017
1 parent 567a0dc commit e0fc0af
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -13,7 +13,7 @@
"symfony/console": "~2.3 || ~3.0 || ~4.0"
},
"require-dev": {
"phpunit/phpunit": "~4.4 || ~5.7 || ~6.4"
"phpunit/phpunit": "~4.8.36 || ~5.7 || ~6.4"
},
"autoload": {
"psr-4": {
Expand Down
Expand Up @@ -2,14 +2,15 @@

namespace Stecman\Component\Symfony\Console\BashCompletion\Tests\Common;

use PHPUnit\Framework\TestCase;
use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext;
use Stecman\Component\Symfony\Console\BashCompletion\CompletionHandler;
use Symfony\Component\Console\Application;

/**
* Base test case for running CompletionHandlers
*/
abstract class CompletionHandlerTestCase extends \PHPUnit_Framework_TestCase
abstract class CompletionHandlerTestCase extends TestCase
{
/**
* @var Application
Expand Down
Expand Up @@ -2,10 +2,11 @@

namespace Stecman\Component\Symfony\Console\BashCompletion\Tests;

use PHPUnit\Framework\TestCase;
use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext;
use Stecman\Component\Symfony\Console\BashCompletion\EnvironmentCompletionContext;

class CompletionContextTest extends \PHPUnit_Framework_TestCase
class CompletionContextTest extends TestCase
{

public function testWordBreakSplit()
Expand Down
Expand Up @@ -2,9 +2,10 @@

namespace Stecman\Component\Symfony\Console\BashCompletion\Tests;

use PHPUnit\Framework\TestCase;
use Stecman\Component\Symfony\Console\BashCompletion\HookFactory;

class HookFactoryTest extends \PHPUnit_Framework_TestCase
class HookFactoryTest extends TestCase
{
/**
* @var HookFactory
Expand Down Expand Up @@ -91,9 +92,7 @@ protected function assertSyntaxIsValid($code, $syntaxCheckCommand, $context)

$status = proc_close($process);

if ($status !== 0) {
$this->fail("Syntax check for $context failed:\n$output");
}
$this->assertSame(0, $status, "Syntax check for $context failed:\n$output");
} else {
throw new \RuntimeException("Failed to start process with command '$syntaxCheckCommand'");
}
Expand Down

0 comments on commit e0fc0af

Please sign in to comment.