Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit77892d8

Browse files
authored
Fix auto-injection of the tester property (#6856)
1 parentd702f93 commit77892d8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

‎src/Codeception/Test/Unit.php‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,11 @@ protected function _setUp()
7878
$di =$metadata->getService('di');
7979

8080
// Auto-inject $tester property
81-
if ($actor =$metadata->getCurrent('actor')) {
82-
$suffix = (string) Configuration::config()['actor_suffix'];
83-
$property =lcfirst($suffix);
84-
if (property_exists($this,$property)) {
85-
$this->{$property} =$di->instantiate($actor);
86-
}
81+
if (
82+
($actor =$this->getMetadata()->getCurrent('actor')) &&
83+
($property =lcfirst((string) Configuration::config()['actor_suffix']))
84+
) {
85+
$this->{$property} =$di->instantiate($actor);
8786
}
8887

8988
$this->scenario =$di->get(Scenario::class);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp