Test PHP headers with PHPUnit

后端 未结 7 1411
不思量自难忘°
不思量自难忘° 2020-11-30 22:05

I\'m trying to use PHPunit to test a class that outputs some custom headers.

The problem is that on my machine this:



        
相关标签:
7条回答
  • 2020-11-30 22:41

    As already mentioned in a comment, I think it's a better solution to define processIsolation in the XML config file like

         <?xml version="1.0" encoding="UTF-8"?>
         <phpunit
            processIsolation            = "true"
            // ... 
         >
         </phpunit>
    

    Like this, you don't have to pass the --stderr option, which might irritate your co-workers.

    0 讨论(0)
提交回复
热议问题