mirror of
https://github.com/danog/psalm-plugin-laravel.git
synced 2024-11-27 04:45:26 +01:00
commit
4175b445a4
29
tests/acceptance/Helpers.feature
Normal file
29
tests/acceptance/Helpers.feature
Normal file
@ -0,0 +1,29 @@
|
||||
Feature: helpers
|
||||
Background:
|
||||
Given I have the following config
|
||||
"""
|
||||
<?xml version="1.0"?>
|
||||
<psalm totallyTyped="true">
|
||||
<projectFiles>
|
||||
<directory name="."/>
|
||||
<ignoreFiles> <directory name="../../vendor"/> </ignoreFiles>
|
||||
</projectFiles>
|
||||
<plugins>
|
||||
<pluginClass class="Psalm\LaravelPlugin\Plugin"/>
|
||||
</plugins>
|
||||
</psalm>
|
||||
"""
|
||||
And I have the following code preamble
|
||||
"""
|
||||
<?php declare(strict_types=1);
|
||||
"""
|
||||
|
||||
Scenario: env can be pulled off the app
|
||||
Given I have the following code
|
||||
"""
|
||||
if (app()->environment('production')) {
|
||||
// do something
|
||||
}
|
||||
"""
|
||||
When I run Psalm
|
||||
Then I see no errors
|
Loading…
Reference in New Issue
Block a user