psalm-plugin-laravel/tests/acceptance/DBFacadeAlias.feature
Martin Zurowietz cf9fbd88c0
DB facade alias support (#126)
* Convert DB facade stub method to static
2021-07-04 13:18:39 -04:00

32 lines
762 B
Gherkin

Feature: DB facade alias
Want to check that the alias of the DB facade works properly
Background:
Given I have the following config
"""
<?xml version="1.0"?>
<psalm totallyTyped="false">
<projectFiles>
<directory name="."/>
<ignoreFiles> <directory name="../../vendor"/> </ignoreFiles>
</projectFiles>
<plugins>
<pluginClass class="Psalm\LaravelPlugin\Plugin"/>
</plugins>
</psalm>
"""
Scenario: call the DB facade alias
Given I have the following code
"""
<?php declare(strict_types=1);
namespace Tests\Psalm\LaravelPlugin\Sandbox;
function test(): void {
\DB::raw(1);
}
"""
When I run Psalm
Then I see no errors