12
12
namespace Symfony \Cmf \Component \Testing \Phpunit ;
13
13
14
14
use Doctrine \Common \DataFixtures \Purger ;
15
+ use PHPUnit \Framework \AssertionFailedError ;
16
+ use PHPUnit \Framework \Test ;
17
+ use PHPUnit \Framework \TestListener ;
18
+ use PHPUnit \Framework \Warning ;
15
19
use Symfony \Component \Process \PhpExecutableFinder ;
16
20
use Symfony \Component \Process \Process ;
17
21
use Symfony \Component \Process \ProcessUtils ;
18
22
19
- class DatabaseTestListener implements \PHPUnit_Framework_TestListener
23
+ class DatabaseTestListener implements TestListener
20
24
{
21
25
protected static $ currentSuite ;
22
26
@@ -52,31 +56,31 @@ public function getProcess($arguments)
52
56
return new Process ($ arguments );
53
57
}
54
58
55
- public function addError (\ PHPUnit_Framework_Test $ test , \Exception $ e , $ time )
59
+ public function addError (Test $ test , \Exception $ e , $ time )
56
60
{
57
61
}
58
62
59
- public function addFailure (\ PHPUnit_Framework_Test $ test , \ PHPUnit_Framework_AssertionFailedError $ e , $ time )
63
+ public function addFailure (Test $ test , AssertionFailedError $ e , $ time )
60
64
{
61
65
}
62
66
63
- public function addWarning (\ PHPUnit_Framework_Test $ test , \ PHPUnit_Framework_Warning $ e , $ time )
67
+ public function addWarning (Test $ test , Warning $ e , $ time )
64
68
{
65
69
}
66
70
67
- public function addIncompleteTest (\ PHPUnit_Framework_Test $ test , \Exception $ e , $ time )
71
+ public function addIncompleteTest (Test $ test , \Exception $ e , $ time )
68
72
{
69
73
}
70
74
71
- public function addSkippedTest (\ PHPUnit_Framework_Test $ test , \Exception $ e , $ time )
75
+ public function addSkippedTest (Test $ test , \Exception $ e , $ time )
72
76
{
73
77
}
74
78
75
- public function addRiskyTest (\ PHPUnit_Framework_Test $ test , \Exception $ e , $ time )
79
+ public function addRiskyTest (Test $ test , \Exception $ e , $ time )
76
80
{
77
81
}
78
82
79
- public function startTest (\ PHPUnit_Framework_Test $ test )
83
+ public function startTest (Test $ test )
80
84
{
81
85
switch (static ::$ currentSuite ->getName ()) {
82
86
case 'orm ' :
@@ -99,11 +103,11 @@ public function startTest(\PHPUnit_Framework_Test $test)
99
103
$ purger ->purge ();
100
104
}
101
105
102
- public function endTest (\ PHPUnit_Framework_Test $ test , $ time )
106
+ public function endTest (Test $ test , $ time )
103
107
{
104
108
}
105
109
106
- public function startTestSuite (\ PHPUnit_Framework_TestSuite $ suite )
110
+ public function startTestSuite (TestSuite $ suite )
107
111
{
108
112
static ::$ currentSuite = $ suite ;
109
113
@@ -202,7 +206,7 @@ private function setUpOrmDatabase($suite)
202
206
echo '[ORM] ' .PHP_EOL ;
203
207
}
204
208
205
- public function endTestSuite (\ PHPUnit_Framework_TestSuite $ suite )
209
+ public function endTestSuite (TestSuite $ suite )
206
210
{
207
211
if (!in_array ($ suite ->getName (), ['phpcr ' , 'orm ' ])) {
208
212
return ;
0 commit comments