Skip to content

Commit

Permalink
Update phpunit to use highest version possible (#391)
Browse files Browse the repository at this point in the history
* use highest possible PhpUnit

* update lowest phpunit
  • Loading branch information
gmponos committed Dec 10, 2019
1 parent 5d5b5a6 commit 12dda10
Show file tree
Hide file tree
Showing 35 changed files with 45 additions and 75 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -37,7 +37,7 @@
"nikic/php-parser": "^3|^4"
},
"require-dev": {
"phpunit/phpunit": ">=4.8.27,<=5.7.13",
"phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14",
"sebastian/comparator": ">=1.2.3",
"squizlabs/php_codesniffer": "^3.5"
},
Expand Down
2 changes: 1 addition & 1 deletion tests/Application/Config/File/ConfigFileReaderTest.php
Expand Up @@ -3,7 +3,7 @@

use Hal\Application\Config\File\ConfigFileReaderInterface;

class ConfigFileReaderTest extends \PHPUnit_Framework_TestCase
class ConfigFileReaderTest extends \PHPUnit\Framework\TestCase
{
public function testJsonConfigFile()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Application/Config/ParserTest.php
Expand Up @@ -7,7 +7,7 @@
* @group application
* @group config
*/
class ParserTest extends \PHPUnit_Framework_TestCase
class ParserTest extends \PHPUnit\Framework\TestCase
{
/**
* @dataProvider providesExample
Expand Down
4 changes: 2 additions & 2 deletions tests/Component/Ast/NodeTraverserTest.php
Expand Up @@ -3,9 +3,9 @@

use Hal\Component\Ast\NodeTraverser;
use PhpParser\NodeTraverser as BaseTraverser;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;

class NodeTraverserTest extends PHPUnit_Framework_TestCase
class NodeTraverserTest extends TestCase
{
public function testItCanBeInstantiated()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Component/File/FinderTest.php
Expand Up @@ -3,12 +3,12 @@
namespace Test\Hal\Component\File;

use Hal\Component\File\Finder;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;

/**
* @group file
*/
class FinderTest extends PHPUnit_Framework_TestCase
class FinderTest extends TestCase
{
public function testPathsGivenAreRecoveredOverExcluded()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Component/Issuer/IssuerTest.php
Expand Up @@ -9,7 +9,7 @@
/**
* @group issue
*/
class IssuerTest extends \PHPUnit_Framework_TestCase
class IssuerTest extends \PHPUnit\Framework\TestCase
{

public function testICanEnableIssuer()
Expand Down
2 changes: 1 addition & 1 deletion tests/Component/Tree/GraphDeduplicatedTest.php
Expand Up @@ -9,7 +9,7 @@
/**
* @group tree
*/
class GraphDeduplicatedTest extends \PHPUnit_Framework_TestCase
class GraphDeduplicatedTest extends \PHPUnit\Framework\TestCase
{

public function testEdgeDeduplication()
Expand Down
6 changes: 1 addition & 5 deletions tests/Component/Tree/GraphTest.php
Expand Up @@ -2,18 +2,14 @@

namespace Test;

use Hal\Component\Tree\Edge;
use Hal\Component\Tree\Graph;
use Hal\Component\Tree\GraphFactory;
use Hal\Component\Tree\HashMap;
use Hal\Component\Tree\Node;

/**
* @group tree
*/
class GraphTest extends \PHPUnit_Framework_TestCase
class GraphTest extends \PHPUnit\Framework\TestCase
{

public function testICanAddEdge()
{
$graph = new Graph();
Expand Down
5 changes: 1 addition & 4 deletions tests/Component/Tree/HashMapTest.php
Expand Up @@ -2,15 +2,13 @@

namespace Test;

use Hal\Component\Token\Token;
use Hal\Component\Token\Tokenizer;
use Hal\Component\Tree\HashMap;
use Hal\Component\Tree\Node;

/**
* @group tree
*/
class HashMapTest extends \PHPUnit_Framework_TestCase
class HashMapTest extends \PHPUnit\Framework\TestCase
{

public function testICanWorkWithHashMap()
Expand All @@ -34,7 +32,6 @@ public function testICanWorkWithHashMap()

public function testICanIterateThroughHashMap()
{
$hash = new HashMap;
$hash = new HashMap;
$hash
->attach(new Node('A', 'value1'))
Expand Down
3 changes: 1 addition & 2 deletions tests/Component/Tree/NodeTest.php
Expand Up @@ -8,9 +8,8 @@
/**
* @group tree
*/
class NodeTest extends \PHPUnit_Framework_TestCase
class NodeTest extends \PHPUnit\Framework\TestCase
{

public function testICanWorkWithNode()
{

Expand Down
6 changes: 1 addition & 5 deletions tests/Component/Tree/Operator/CycleDetectorTest.php
Expand Up @@ -2,19 +2,15 @@

namespace Test;

use Hal\Component\Tree\Edge;
use Hal\Component\Tree\Graph;
use Hal\Component\Tree\GraphFactory;
use Hal\Component\Tree\HashMap;
use Hal\Component\Tree\Node;
use Hal\Component\Tree\Operator\CycleDetector;

/**
* @group tree
*/
class CycleDetectorTest extends \PHPUnit_Framework_TestCase
class CycleDetectorTest extends \PHPUnit\Framework\TestCase
{

public function testCycleIsDetected()
{
$graph = new Graph();
Expand Down
2 changes: 1 addition & 1 deletion tests/Component/Tree/Operator/SizeOfTreeTest.php
Expand Up @@ -10,7 +10,7 @@
/**
* @group tree
*/
class SizeOfTreeTest extends \PHPUnit_Framework_TestCase
class SizeOfTreeTest extends \PHPUnit\Framework\TestCase
{

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Metric/Class_/ClassEnumVisitorTest.php
Expand Up @@ -10,7 +10,7 @@
/**
* @group class
*/
class ClassEnumVisitorTest extends \PHPUnit_Framework_TestCase
class ClassEnumVisitorTest extends \PHPUnit\Framework\TestCase
{
/**
* @dataProvider provideExamples
Expand Down
Expand Up @@ -8,7 +8,7 @@
use PhpParser\NodeVisitor\NameResolver;
use PhpParser\ParserFactory;

class CyclomaticComplexityVisitorTest extends \PHPUnit_Framework_TestCase
class CyclomaticComplexityVisitorTest extends \PHPUnit\Framework\TestCase
{
/**
* @dataProvider provideExamplesForCcn
Expand Down
6 changes: 1 addition & 5 deletions tests/Metric/Class_/Complexity/KanDefectVisitorTest.php
Expand Up @@ -2,9 +2,7 @@
namespace Test\Hal\Metric\Class_\Coupling;

use Hal\Metric\Class_\ClassEnumVisitor;
use Hal\Metric\Class_\Complexity\CyclomaticComplexityVisitor;
use Hal\Metric\Class_\Complexity\KanDefectVisitor;
use Hal\Metric\Class_\Complexity\McCabeVisitor;
use Hal\Metric\Metrics;
use PhpParser\ParserFactory;

Expand All @@ -13,10 +11,8 @@
* @group kan
* @group defect
*/
class KanDefectVisitorTest extends \PHPUnit_Framework_TestCase
class KanDefectVisitorTest extends \PHPUnit\Framework\TestCase
{


/**
* @dataProvider provideExamples
*/
Expand Down
Expand Up @@ -2,7 +2,6 @@
namespace Test\Hal\Metric\Class_\Coupling;

use Hal\Metric\Class_\ClassEnumVisitor;
use Hal\Metric\Class_\Complexity\McCabeVisitor;
use Hal\Metric\Class_\Structural\SystemComplexityVisitor;
use Hal\Metric\Metrics;
use PhpParser\ParserFactory;
Expand All @@ -12,10 +11,8 @@
* @group complexity
* @group defect
*/
class SystemComplexityVisitorTest extends \PHPUnit_Framework_TestCase
class SystemComplexityVisitorTest extends \PHPUnit\Framework\TestCase
{


/**
* @dataProvider provideExamples
*/
Expand Down
Expand Up @@ -10,10 +10,8 @@
* @group mi
* @group complex
*/
class MaintainabilityIndexVisitorTest extends \PHPUnit_Framework_TestCase
class MaintainabilityIndexVisitorTest extends \PHPUnit\Framework\TestCase
{


/**
* @dataProvider provideValues
*/
Expand Down
5 changes: 1 addition & 4 deletions tests/Metric/Class_/Coupling/ExternalsVisitorTest.php
Expand Up @@ -2,7 +2,6 @@
namespace Test\Hal\Metric\Class_\Coupling;

use Hal\Metric\Class_\ClassEnumVisitor;
use Hal\Metric\Class_\Complexity\McCabeVisitor;
use Hal\Metric\Class_\Coupling\ExternalsVisitor;
use Hal\Metric\Metrics;
use PhpParser\ParserFactory;
Expand All @@ -12,10 +11,8 @@
* @group externals
* @group coupling
*/
class ExternalsVisitorTest extends \PHPUnit_Framework_TestCase
class ExternalsVisitorTest extends \PHPUnit\Framework\TestCase
{


/**
* @dataProvider provideExamples
*/
Expand Down
4 changes: 1 addition & 3 deletions tests/Metric/Class_/Structural/LcomVisitorTest.php
Expand Up @@ -6,10 +6,8 @@
use Hal\Metric\Metrics;
use PhpParser\ParserFactory;

class LcomVisitorTest extends \PHPUnit_Framework_TestCase
class LcomVisitorTest extends \PHPUnit\Framework\TestCase
{


/**
* @dataProvider provideExamples
*/
Expand Down
4 changes: 1 addition & 3 deletions tests/Metric/Class_/Text/HalsteadVisitorTest.php
Expand Up @@ -10,10 +10,8 @@
* @group halstead
* @group metric
*/
class HalsteadVisitorTest extends \PHPUnit_Framework_TestCase
class HalsteadVisitorTest extends \PHPUnit\Framework\TestCase
{


/**
* @dataProvider provideExamples
*/
Expand Down
4 changes: 1 addition & 3 deletions tests/Metric/Class_/Text/LengthVisitorTest.php
Expand Up @@ -10,10 +10,8 @@
* @group loc
* @group metric
*/
class LengthVisitorTest extends \PHPUnit_Framework_TestCase
class LengthVisitorTest extends \PHPUnit\Framework\TestCase
{


/**
* @dataProvider provideExamples
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/Metric/Helper/RoleOfMethodDetectorTest.php
Expand Up @@ -11,7 +11,7 @@
* @group helper
* @group parsing
*/
class RoleOfMethodDetectorTest extends \PHPUnit_Framework_TestCase
class RoleOfMethodDetectorTest extends \PHPUnit\Framework\TestCase
{
/**
* @dataProvider provideExamples
Expand Down
4 changes: 2 additions & 2 deletions tests/Metric/Package/PackageAbstractionTest.php
Expand Up @@ -7,13 +7,13 @@
use Hal\Metric\Metrics;
use Hal\Metric\Package\PackageAbstraction;
use Hal\Metric\PackageMetric;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;

/**
* @group metric
* @group package
*/
class PackageAbstractionTest extends PHPUnit_Framework_TestCase
class PackageAbstractionTest extends TestCase
{
public function testItCalculatesTheAbstractionOfEachPackage()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Metric/Package/PackageCollectingVisitorTest.php
Expand Up @@ -9,13 +9,13 @@
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitor\NameResolver;
use PhpParser\ParserFactory;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;

/**
* @group metric
* @group package
*/
class PackageCollectingVisitorTest extends PHPUnit_Framework_TestCase
class PackageCollectingVisitorTest extends TestCase
{
public function testItUsesThePackageAndTheSubpackageAnnotationAsPackageName()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Metric/Package/PackageDependenciesTest.php
Expand Up @@ -6,13 +6,13 @@
use Hal\Metric\Metrics;
use Hal\Metric\Package\PackageDependencies;
use Hal\Metric\PackageMetric;
use PHPUnit_Framework_TestCase;
use \PHPUnit\Framework\TestCase;

/**
* @group metric
* @group package
*/
class PackageDependenciesTest extends PHPUnit_Framework_TestCase
class PackageDependenciesTest extends TestCase
{
public function testItCollectsAllIncomingAndOutgoingPackageDependencies()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Metric/Package/PackageDistanceTest.php
Expand Up @@ -6,13 +6,13 @@
use Hal\Metric\Metrics;
use Hal\Metric\Package\PackageDistance;
use Hal\Metric\PackageMetric;
use PHPUnit_Framework_TestCase;
use \PHPUnit\Framework\TestCase;

/**
* @group metric
* @group package
*/
class PackageDistanceTest extends PHPUnit_Framework_TestCase
class PackageDistanceTest extends TestCase
{
/**
* @dataProvider provideExamples
Expand Down
4 changes: 2 additions & 2 deletions tests/Metric/Package/PackageInstabilityTest.php
Expand Up @@ -5,13 +5,13 @@
use Hal\Metric\Metrics;
use Hal\Metric\Package\PackageInstability;
use Hal\Metric\PackageMetric;
use PHPUnit_Framework_TestCase;
use \PHPUnit\Framework\TestCase;

/**
* @group metric
* @group package
*/
class PackageInstabilityTest extends PHPUnit_Framework_TestCase
class PackageInstabilityTest extends TestCase
{
public function testItCalculatesTheInstabilityOfEachPackage()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Metric/PackageMetricTest.php
Expand Up @@ -4,9 +4,9 @@

use Hal\Metric\Metric;
use Hal\Metric\PackageMetric;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;

class PackageMetricTest extends PHPUnit_Framework_TestCase
class PackageMetricTest extends TestCase
{
public function testItIsAMetric()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Metric/System/UnitTesting/UnitTestingTest.php
Expand Up @@ -8,7 +8,7 @@
/**
* @group unit
*/
class UnitTestingTest extends \PHPUnit_Framework_TestCase
class UnitTestingTest extends \PHPUnit\Framework\TestCase
{

public function testICanParseJunitXmlFile()
Expand Down

0 comments on commit 12dda10

Please sign in to comment.