Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added @ operator to silence notice from tempnam() #51

Merged
merged 1 commit into from Aug 1, 2018

Conversation

AndrewCarterUK
Copy link
Member

So I'm not sure about this one, but on my machine I was getting the following error running the test suite:

andrew@ANDREW-LAPTOP-DEBIAN:~/Development/PHPFastCGI/FastCGIDaemon$ vendor/bin/phpunit 
PHPUnit 7.2.7 by Sebastian Bergmann and contributors.

................................................E                 49 / 49 (100%)

Time: 7.17 seconds, Memory: 6.00MB

There was 1 error:

1) PHPFastCGI\Test\FastCGIDaemon\Http\RequestTest::testMultipartContentWithMultipleFiles
tempnam(): file created in the system's temporary directory

/home/andrew/Development/PHPFastCGI/FastCGIDaemon/src/Http/Request.php:167
/home/andrew/Development/PHPFastCGI/FastCGIDaemon/src/Http/Request.php:127
/home/andrew/Development/PHPFastCGI/FastCGIDaemon/test/Http/RequestTest.php:250

ERRORS!
Tests: 49, Assertions: 178, Errors: 1.

It looks like tempnam() is throwing out a notice to say it created the file - which is being converted to an error by the test suite.

I guess an alternative approach would be to change the PHPUnit configuration - but I'm wondering if any frameworks might also get pestered by this notice and it's best just suppressing it?

Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. It seams fair. We are checking he success of the upload anyways.

@Nyholm Nyholm merged commit 01a8f0b into master Aug 1, 2018
@Nyholm Nyholm deleted the bug/test-fail-from-tempnam-notice branch August 7, 2018 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants