error about global side-effects in non-isolated tests

Aperta
#265 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
php
Ambito
testing

Direzione di ricerca

Start by reviewing the PHPUnit process-isolation cases named in the issue, including @runInSeparateProcess and @runTestsInSeparateProcesses. Define how tests that change error reporting, handlers, wrappers, or global variables should be detected and how isolated tests are exempted; done means the requested global side effects produce errors only for non-isolated tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I think it would be helpful if we could error in tests which trigger a global side-effect like e.g.

  • error_reporting(E_ALL) when not restored to the old value within the test, see example
  • things like registration of a shutdown/autoload/tick/error-handler/exception-handler/stream-wrapper/...-function without cleanup
  • changes in global/super-global variables

no error should appear in case such a pattern occurs in tests which a run using PHPUnit process isolation (@runInSeparateProcess, @runTestsInSeparateProcesses, etc)

Lingua principale
PHP
Stelle
544
Fork
58
Merge medio
2g 1h
PR unite (30g)
5

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di phpstan/phpstan-phpunit

Tutte le issue di phpstan/phpstan-phpunit

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.