Skip to content

Commit 389298b

Browse files
committed
Upgrade TestCase to namespaced variant + remove unused imports
1 parent 48eab25 commit 389298b

11 files changed

+22
-63
lines changed

test/Exercise/ArrayWeGoTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@
1010
use PhpSchool\PhpWorkshop\Exercise\ExerciseType;
1111
use PhpSchool\PhpWorkshop\ExerciseDispatcher;
1212
use PhpSchool\PhpWorkshop\Solution\SolutionInterface;
13-
use PHPUnit_Framework_TestCase;
13+
use PHPUnit\Framework\TestCase;
1414
use Symfony\Component\Filesystem\Filesystem;
1515

1616
/**
17-
* Class ArrayWeGoTest
18-
* @package PhpSchool\LearnYouPhpTest\Exercise
1917
* @author Michael Woodward <[email protected]>
2018
*/
21-
class ArrayWeGoTest extends PHPUnit_Framework_TestCase
19+
class ArrayWeGoTest extends TestCase
2220
{
2321

2422
/**

test/Exercise/BabyStepsTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@
55

66
use PhpSchool\PhpWorkshop\Exercise\ExerciseType;
77
use PhpSchool\PhpWorkshop\Solution\SolutionInterface;
8-
use PHPUnit_Framework_TestCase;
8+
use PHPUnit\Framework\TestCase;
99
use PhpSchool\LearnYouPhp\Exercise\BabySteps;
1010

1111
/**
12-
* Class BabyStepsTest
13-
* @package PhpSchool\LearnYouPhpTest\Exercise
1412
* @author Aydin Hassan <[email protected]>
1513
*/
16-
class BabyStepsTest extends PHPUnit_Framework_TestCase
14+
class BabyStepsTest extends TestCase
1715
{
1816
public function testHelloWorldExercise()
1917
{

test/Exercise/ConcernedAboutSeparationTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,15 @@
99
use PhpSchool\PhpWorkshop\Exercise\ExerciseType;
1010
use PhpSchool\PhpWorkshop\Input\Input;
1111
use PhpSchool\PhpWorkshop\Result\Failure;
12-
use PhpSchool\PhpWorkshop\Result\FailureInterface;
1312
use PhpSchool\PhpWorkshop\Result\Success;
1413
use PhpSchool\PhpWorkshop\Solution\SolutionInterface;
15-
use PHPUnit_Framework_TestCase;
14+
use PHPUnit\Framework\TestCase;
1615
use Symfony\Component\Filesystem\Filesystem;
1716

1817
/**
19-
* Class ConcernedAboutSeparationTest
20-
* @package PhpSchool\LearnYouPhpTest\Exercise
2118
* @author Aydin Hassan <[email protected]>
2219
*/
23-
class ConcernedAboutSeparationTest extends PHPUnit_Framework_TestCase
20+
class ConcernedAboutSeparationTest extends TestCase
2421
{
2522
/**
2623
* @var Filesystem

test/Exercise/DatabaseReadTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@
1010
use PhpSchool\PhpWorkshop\Exercise\ExerciseType;
1111
use PhpSchool\PhpWorkshop\ExerciseDispatcher;
1212
use PhpSchool\PhpWorkshop\Solution\SolutionInterface;
13-
use PHPUnit_Framework_TestCase;
13+
use PHPUnit\Framework\TestCase;
1414

1515
/**
16-
* Class DatabaseReadTest
17-
* @package PhpSchool\LearnYouPhpTest\Exercise
1816
* @author Aydin Hassan <[email protected]>
1917
*/
20-
class DatabaseReadTest extends PHPUnit_Framework_TestCase
18+
class DatabaseReadTest extends TestCase
2119
{
2220
/**
2321
* @var Generator

test/Exercise/DependencyHeavenTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@
99
use PhpSchool\PhpWorkshop\Exercise\ExerciseType;
1010
use PhpSchool\PhpWorkshop\ExerciseDispatcher;
1111
use PhpSchool\PhpWorkshop\Solution\SolutionInterface;
12-
use PHPUnit_Framework_TestCase;
12+
use PHPUnit\Framework\TestCase;
1313
use Psr\Http\Message\RequestInterface;
1414

1515
/**
16-
* Class DependencyHeavenTest
17-
* @package PhpSchool\LearnYouPhpTest\Exercise
1816
* @author Michael Woodward <[email protected]>
1917
*/
20-
class DependencyHeavenTest extends PHPUnit_Framework_TestCase
18+
class DependencyHeavenTest extends TestCase
2119
{
2220

2321
/**

test/Exercise/ExceptionalCodingTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,13 @@
1010
use PhpSchool\PhpWorkshop\Exercise\ExerciseType;
1111
use PhpSchool\PhpWorkshop\ExerciseDispatcher;
1212
use PhpSchool\PhpWorkshop\Solution\SolutionInterface;
13-
use PHPUnit_Framework_TestCase;
14-
use PhpSchool\LearnYouPhp\Exercise\MyFirstIo;
13+
use PHPUnit\Framework\TestCase;
1514
use Symfony\Component\Filesystem\Filesystem;
1615

1716
/**
18-
* Class ExceptionalCodingTest
19-
* @package PhpSchool\LearnYouPhpTest\Exercise
2017
* @author Michael Woodward <[email protected]>
2118
*/
22-
class ExceptionalCodingTest extends PHPUnit_Framework_TestCase
19+
class ExceptionalCodingTest extends TestCase
2320
{
2421

2522
/**

test/Exercise/FilteredLsTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,14 @@
55

66
use PhpSchool\PhpWorkshop\Exercise\ExerciseType;
77
use PhpSchool\PhpWorkshop\Solution\SolutionInterface;
8-
use PHPUnit_Framework_TestCase;
8+
use PHPUnit\Framework\TestCase;
99
use PhpSchool\LearnYouPhp\Exercise\FilteredLs;
1010
use Symfony\Component\Filesystem\Filesystem;
1111

1212
/**
13-
* Class FilteredLsTest
14-
* @package PhpSchool\LearnYouPhpTest\Exercise
1513
* @author Aydin Hassan <[email protected]>
1614
*/
17-
class FilteredLsTest extends PHPUnit_Framework_TestCase
15+
class FilteredLsTest extends TestCase
1816
{
1917

2018
/**

test/Exercise/HelloWorldTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@
55

66
use PhpSchool\PhpWorkshop\Exercise\ExerciseType;
77
use PhpSchool\PhpWorkshop\Solution\SolutionInterface;
8-
use PHPUnit_Framework_TestCase;
8+
use PHPUnit\Framework\TestCase;
99
use PhpSchool\LearnYouPhp\Exercise\HelloWorld;
1010

1111
/**
12-
* Class HelloWorldTest
13-
* @package PhpSchool\LearnYouPhpTest\Exercise
1412
* @author Aydin Hassan <[email protected]>
1513
*/
16-
class HelloWorldTest extends PHPUnit_Framework_TestCase
14+
class HelloWorldTest extends TestCase
1715
{
1816
public function testHelloWorldExercise()
1917
{

test/Exercise/HttpJsonApiTest.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,16 @@
33

44
namespace PhpSchool\LearnYouPhpTest\Exercise;
55

6-
use Faker\Factory;
7-
use Faker\Generator;
8-
use PhpSchool\LearnYouPhp\Exercise\ArrayWeGo;
96
use PhpSchool\LearnYouPhp\Exercise\HttpJsonApi;
107
use PhpSchool\PhpWorkshop\Exercise\ExerciseType;
118
use PhpSchool\PhpWorkshop\Solution\SolutionInterface;
12-
use PHPUnit_Framework_TestCase;
13-
use PhpSchool\LearnYouPhp\Exercise\MyFirstIo;
9+
use PHPUnit\Framework\TestCase;
1410
use Psr\Http\Message\RequestInterface;
15-
use Symfony\Component\Filesystem\Filesystem;
1611

1712
/**
18-
* Class HttpJsonApiTest
19-
* @package PhpSchool\LearnYouPhpTest\Exercise
2013
* @author Aydin Hassan <[email protected]>
2114
*/
22-
class HttpJsonApiTest extends PHPUnit_Framework_TestCase
15+
class HttpJsonApiTest extends TestCase
2316
{
2417
public function testHttpJsonApiExercise()
2518
{

test/Exercise/MyFirstIoTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,14 @@
99
use PhpSchool\PhpWorkshop\Exercise\ExerciseType;
1010
use PhpSchool\PhpWorkshop\ExerciseDispatcher;
1111
use PhpSchool\PhpWorkshop\Solution\SolutionInterface;
12-
use PHPUnit_Framework_TestCase;
12+
use PHPUnit\Framework\TestCase;
1313
use PhpSchool\LearnYouPhp\Exercise\MyFirstIo;
1414
use Symfony\Component\Filesystem\Filesystem;
1515

1616
/**
17-
* Class MyFirstIoTest
18-
* @package PhpSchool\LearnYouPhpTest\Exercise
1917
* @author Aydin Hassan <[email protected]>
2018
*/
21-
class MyFirstIoTest extends PHPUnit_Framework_TestCase
19+
class MyFirstIoTest extends TestCase
2220
{
2321

2422
/**

0 commit comments

Comments
 (0)