Skip to content
New issue

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

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

Already on GitHub? # to your account

paratest doesn't take the globals in phpunit.xml? #68

Closed
Nikoms opened this issue Nov 29, 2013 · 5 comments · Fixed by #495
Closed

paratest doesn't take the globals in phpunit.xml? #68

Nikoms opened this issue Nov 29, 2013 · 5 comments · Fixed by #495

Comments

@Nikoms
Copy link

Nikoms commented Nov 29, 2013

Hello,

For my unit tests, i need to have a specific "HTTP_HOST", so I put this in my phpunit.xml:

I use "$_SERVER['HTTP_HOST']" in my bootstrap.php (declared in the phpunit.xml).

It works with phpunit, but when I run it with paratest, this variable is not set.

Is this a bug or did i make something wrong?

Thank you.

@giorgiosironi
Copy link
Contributor

The superglobal variable is $_SERVER, not $SERVER. Does this make a difference?

@Nikoms
Copy link
Author

Nikoms commented Dec 1, 2013

Hello. Yes, it's $_SERVER, I don't know why github removed "_" in my example.

And the xml that I put yesterday isn't visible. I took it from my phpunit.xml. I confirm that it works with phpunit "standalone"

<php>
        <server name="HTTP_HOST" value="mywebsite.com" />
</php>

@Nikoms
Copy link
Author

Nikoms commented Dec 10, 2013

i will take a look and try to contribute ;)

@julianseeger julianseeger added this to the bugs - probably quick to fix milestone Apr 19, 2014
@Nikoms
Copy link
Author

Nikoms commented May 14, 2014

Hi,

Here are some news:

I think there are 2 bugs. One in phpunit itself, and one in paratest.

I ask for a pull request in phpunit (sebastianbergmann/phpunit#1248). Once it's fixed, I will then check for the bug in paratest.

So for the moment I'm blocked.

Cheers!

@julianseeger
Copy link
Contributor

ftr.: sebastianbergmann/phpunit#1248 is merged

@julianseeger julianseeger removed this from the bugs - probably quick to fix milestone Feb 2, 2015
@Nikoms Nikoms removed this from the bugs - probably quick to fix milestone Feb 2, 2015
Slamdunk added a commit to Slamdunk/paratest that referenced this issue Aug 4, 2020
Slamdunk added a commit that referenced this issue Aug 4, 2020
* Prove #68 is fixed

* Use Runner class for github issues
# for free to join this conversation on GitHub. Already have an account? # to comment
Development

Successfully merging a pull request may close this issue.

3 participants