Skip to content

Commit 8ba63e1

Browse files
authored
Fix getFullName method in CestProvider.php (fixes #97)
1 parent c812ab3 commit 8ba63e1

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

src/Internal/CestProvider.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,12 @@ public function getDescriptionHtml(): ?string
105105
return null;
106106
}
107107

108+
/**
109+
* @psalm-suppress MixedOperand
110+
* @psalm-suppress MixedArgument
111+
*/
108112
public function getFullName(): ?string
109113
{
110-
return null;
114+
return get_class($this->test->getTestClass()) . "::" . $this->test->getTestMethod();
111115
}
112116
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Qameta\Allure\Codeception\Test\Unit;
6+
7+
use Codeception\Test\Cest;
8+
use Codeception\Test\Unit;
9+
use Qameta\Allure\Codeception\Internal\CestProvider;
10+
11+
class CestProviderTest extends Unit
12+
{
13+
public function testFullName(): void
14+
{
15+
$cest = new Cest($this, 'a', 'b');
16+
$cestProvider = new CestProvider($cest);
17+
18+
$this->assertSame(__CLASS__ . '::' . 'a', $cestProvider->getFullName());
19+
}
20+
}

0 commit comments

Comments
 (0)