1 | <?php |
||
48 | class CacheCleanupExtension extends \Codeception\Extension |
||
49 | { |
||
50 | |||
51 | /** |
||
52 | * @var Filesystem |
||
53 | */ |
||
54 | protected $filesystem; |
||
55 | |||
56 | protected $finder; |
||
57 | |||
58 | // list events to listen to |
||
59 | // Codeception\Events constants used to set the event |
||
60 | public static $events = [ |
||
61 | Events::SUITE_AFTER => 'afterSuite', |
||
62 | Events::SUITE_BEFORE => 'beforeSuite', |
||
63 | Events::TEST_BEFORE => 'beforeTest', |
||
64 | Events::TEST_AFTER => 'afterTest', |
||
65 | ]; |
||
66 | |||
67 | public function __construct($config, $options) |
||
73 | |||
74 | |||
75 | // methods that handle events |
||
76 | |||
77 | /** |
||
78 | * @param \Codeception\Event\SuiteEvent $e |
||
79 | */ |
||
80 | public function afterSuite(\Codeception\Event\SuiteEvent $e) |
||
84 | |||
85 | /** |
||
86 | * @param \Codeception\Event\TestEvent $e |
||
87 | */ |
||
88 | public function beforeSuite(\Codeception\Event\SuiteEvent $e) |
||
92 | |||
93 | /** |
||
94 | * @param \Codeception\Event\TestEvent $e |
||
95 | */ |
||
96 | public function beforeTest(\Codeception\Event\TestEvent $e) |
||
100 | |||
101 | /** |
||
102 | * @param \Codeception\Event\TestEvent $e |
||
103 | */ |
||
104 | public function afterTest(\Codeception\Event\TestEvent $e) |
||
108 | |||
109 | |||
110 | /** |
||
111 | * @param string $type |
||
112 | */ |
||
113 | protected function cleanupCache($type) |
||
128 | |||
129 | /** |
||
130 | * @param $name |
||
131 | */ |
||
132 | protected function runCleanupJob($name) |
||
142 | |||
143 | /** |
||
144 | * @param $action |
||
145 | * @param $params |
||
146 | */ |
||
147 | protected function runCleanupJobAction($action, $params) |
||
158 | |||
159 | /** |
||
160 | * @param $params |
||
161 | */ |
||
162 | protected function runCleanupJobDelete($params) |
||
173 | |||
174 | /** |
||
175 | * @param $params |
||
176 | */ |
||
177 | protected function runCleanupJobEmpty($params) |
||
187 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.