1
1
<?php
2
- namespace Yandex \Allure \Adapter ;
2
+ namespace Yandex \Allure \Codeception ;
3
3
4
4
use Codeception \Configuration ;
5
5
use Codeception \Event \FailEvent ;
16
16
use Codeception \Util \Locator ;
17
17
use Symfony \Component \Filesystem \Filesystem ;
18
18
use Symfony \Component \Finder \Finder ;
19
+ use Yandex \Allure \Adapter \Allure ;
19
20
use Yandex \Allure \Adapter \Annotation ;
20
21
use Yandex \Allure \Adapter \Annotation \Description ;
21
22
use Yandex \Allure \Adapter \Annotation \Features ;
22
23
use Yandex \Allure \Adapter \Annotation \Issues ;
23
24
use Yandex \Allure \Adapter \Annotation \Stories ;
24
25
use Yandex \Allure \Adapter \Annotation \Title ;
26
+ use Yandex \Allure \Adapter \Event \AddParameterEvent ;
25
27
use Yandex \Allure \Adapter \Event \StepFinishedEvent ;
26
28
use Yandex \Allure \Adapter \Event \StepStartedEvent ;
27
29
use Yandex \Allure \Adapter \Event \TestCaseBrokenEvent ;
46
48
const DEFAULT_REPORT_DIRECTORY = 'allure-report ' ;
47
49
const INITIALIZED_PARAMETER = '_initialized ' ;
48
50
49
- class AllureAdapter extends Extension
51
+ class AllureCodeception extends Extension
50
52
{
51
53
//NOTE: here we implicitly assume that PHP runs in single-threaded mode
52
54
private $ uuid ;
@@ -306,7 +308,7 @@ function ($a) {
306
308
$ currentExample = $ test ->getMetadata ()->getCurrent ();
307
309
if ($ currentExample && isset ($ currentExample ['example ' ]) ) {
308
310
foreach ($ currentExample ['example ' ] as $ name => $ param ) {
309
- $ paramEvent = new Event \ AddParameterEvent (
311
+ $ paramEvent = new AddParameterEvent (
310
312
$ name , $ this ->stringifyArgument ($ param ), ParameterKind::ARGUMENT );
311
313
$ this ->getLifecycle ()->fire ($ paramEvent );
312
314
}
@@ -319,7 +321,7 @@ function ($a) {
319
321
$ paramNames = $ testMethod ->getParameters ();
320
322
foreach ($ method ->invoke ($ test ) as $ key => $ param ) {
321
323
$ paramName = array_shift ($ paramNames );
322
- $ paramEvent = new Event \ AddParameterEvent (
324
+ $ paramEvent = new AddParameterEvent (
323
325
is_null ($ paramName )
324
326
? $ key
325
327
: $ paramName ->getName (),
0 commit comments