1212namespace Symfony \Cmf \Component \Testing \Phpunit ;
1313
1414use Doctrine \Common \DataFixtures \Purger ;
15+ use PHPUnit \Framework \AssertionFailedError ;
16+ use PHPUnit \Framework \Test ;
17+ use PHPUnit \Framework \TestListener ;
18+ use PHPUnit \Framework \Warning ;
1519use Symfony \Component \Process \PhpExecutableFinder ;
1620use Symfony \Component \Process \Process ;
1721use Symfony \Component \Process \ProcessUtils ;
1822
19- class DatabaseTestListener implements \PHPUnit_Framework_TestListener
23+ class DatabaseTestListener implements TestListener
2024{
2125 protected static $ currentSuite ;
2226
@@ -52,31 +56,31 @@ public function getProcess($arguments)
5256 return new Process ($ arguments );
5357 }
5458
55- public function addError (\ PHPUnit_Framework_Test $ test , \Exception $ e , $ time )
59+ public function addError (Test $ test , \Exception $ e , $ time )
5660 {
5761 }
5862
59- public function addFailure (\ PHPUnit_Framework_Test $ test , \ PHPUnit_Framework_AssertionFailedError $ e , $ time )
63+ public function addFailure (Test $ test , AssertionFailedError $ e , $ time )
6064 {
6165 }
6266
63- public function addWarning (\ PHPUnit_Framework_Test $ test , \ PHPUnit_Framework_Warning $ e , $ time )
67+ public function addWarning (Test $ test , Warning $ e , $ time )
6468 {
6569 }
6670
67- public function addIncompleteTest (\ PHPUnit_Framework_Test $ test , \Exception $ e , $ time )
71+ public function addIncompleteTest (Test $ test , \Exception $ e , $ time )
6872 {
6973 }
7074
71- public function addSkippedTest (\ PHPUnit_Framework_Test $ test , \Exception $ e , $ time )
75+ public function addSkippedTest (Test $ test , \Exception $ e , $ time )
7276 {
7377 }
7478
75- public function addRiskyTest (\ PHPUnit_Framework_Test $ test , \Exception $ e , $ time )
79+ public function addRiskyTest (Test $ test , \Exception $ e , $ time )
7680 {
7781 }
7882
79- public function startTest (\ PHPUnit_Framework_Test $ test )
83+ public function startTest (Test $ test )
8084 {
8185 switch (static ::$ currentSuite ->getName ()) {
8286 case 'orm ' :
@@ -99,11 +103,11 @@ public function startTest(\PHPUnit_Framework_Test $test)
99103 $ purger ->purge ();
100104 }
101105
102- public function endTest (\ PHPUnit_Framework_Test $ test , $ time )
106+ public function endTest (Test $ test , $ time )
103107 {
104108 }
105109
106- public function startTestSuite (\ PHPUnit_Framework_TestSuite $ suite )
110+ public function startTestSuite (TestSuite $ suite )
107111 {
108112 static ::$ currentSuite = $ suite ;
109113
@@ -202,7 +206,7 @@ private function setUpOrmDatabase($suite)
202206 echo '[ORM] ' .PHP_EOL ;
203207 }
204208
205- public function endTestSuite (\ PHPUnit_Framework_TestSuite $ suite )
209+ public function endTestSuite (TestSuite $ suite )
206210 {
207211 if (!in_array ($ suite ->getName (), ['phpcr ' , 'orm ' ])) {
208212 return ;
0 commit comments