Skip to content

Commit

Permalink
feat: Wei 增加 getAliases 方法
Browse files Browse the repository at this point in the history
  • Loading branch information
twinh committed Sep 1, 2024
1 parent e6c4757 commit 69e66df
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions lib/Wei.php
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,16 @@ public function setInis(array $inis)
return $this;
}

/**
* Return the service aliases
*
* @return array
*/
public function getAliases(): array
{
return $this->aliases;
}

/**
* Merge service aliases
*
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/WeiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ public function testDebug()
public function testSetAlias()
{
$this->wei->setAlias('weiName', 'className');
$aliases = $this->wei->getOption('aliases');
$aliases = $this->wei->getAliases();

$this->assertArrayHasKey('weiName', $aliases);
$this->assertEquals('className', $aliases['weiName']);
Expand Down

0 comments on commit 69e66df

Please sign in to comment.