-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathTestListener.php
43 lines (38 loc) · 945 Bytes
/
TestListener.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Tests\Cachet;
use PHPUnit_Framework_BaseTestListener;
use PHPUnit_Framework_TestSuite;
/**
* This is the test listener class.
*
* @author Connor S. Parks <connor@connorvg.tv>
*/
class TestListener extends PHPUnit_Framework_BaseTestListener
{
/**
* A test suite ended.
*
* @since Method available since Release 2.2.0
*
* @param \PHPUnit_Framework_TestSuite $suite
*
* @return void
*/
public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
{
if ($suite->getName() !== 'Cachet Test Suite') {
return;
}
foreach (glob(__DIR__.'/../bootstrap/cache/*.php') as $file) {
unlink($file);
}
}
}