Skip to content

Commit

Permalink
Test with prefix already
Browse files Browse the repository at this point in the history
  • Loading branch information
neild3r committed Mar 25, 2018
1 parent 03d0bf7 commit 21e70bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions test/TypeUtil.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ suite("TypeUtil tests: ", () => {
assert.equal(type.getFullyQualifiedType('FilterInterface', head), '\\App\\Test\\Model\\FilterInterface');
});

test("Fully qualify typehint from namespace with prefix", () => {
let type = new TypeUtil;
Helper.setConfig({qualifyClassNames: true});
assert.equal(type.getFullyQualifiedType('StreamHandler', head), '\\Monolog\\Handler\\StreamHandler');
});

test("Fully qualify typehint from namespace use with alias", () => {
let type = new TypeUtil;
Helper.setConfig({qualifyClassNames: true});
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use App\Test\Model\Example as BaseExample;

use Monolog\Handler\HandlerInterface;
use Monolog\Handler\StreamHandler;
use \Monolog\Handler\StreamHandler;
use Psr\Log\LoggerInterface;
use Psr\Log\InvalidArgumentException;

Expand Down

0 comments on commit 21e70bc

Please sign in to comment.