-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathGroupObject.php
More file actions
31 lines (24 loc) · 656 Bytes
/
GroupObject.php
File metadata and controls
31 lines (24 loc) · 656 Bytes
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
<?php
declare(strict_types=1);
namespace Codeception;
use Codeception\Event\TestEvent;
abstract class GroupObject extends Extension
{
public static $group;
public function _before(TestEvent $event)
{
}
public function _after(TestEvent $event)
{
}
public static function getSubscribedEvents(): array
{
$groupEvents = static::$group
? [
Events::TEST_BEFORE . '.' . static::$group => '_before',
Events::TEST_AFTER . '.' . static::$group => '_after',
]
: [];
return array_merge($groupEvents, parent::getSubscribedEvents());
}
}