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

Fix DDC767Test failing on php7 + pg94 #1374

Merged
merged 1 commit into from Apr 6, 2015

Conversation

mbeccati
Copy link
Contributor

@mbeccati mbeccati commented Apr 5, 2015

The failure happens when running the full suite or even just:

phpunit tests/Doctrine/Tests/ORM/Functional/Ticket

see: https://revive.beccati.com/bamboo/browse/PHP-DOCPG-MAS-164/log

For reference:

05-Apr-2015 04:39:42    ...S......................................................... 1342 / 2921 ( 45%)
05-Apr-2015 04:39:43    ........SSS...........................................SS
05-Apr-2015 04:39:43    Fatal error: Argument 1 passed to Doctrine\Tests\Models\CMS\CmsUser::addGroup() must be an instance of Doctrine\Tests\Models\CMS\CmsGroup, null given, called in /home/atlassian/bamboo/xml-data/build-dir/PHP-DOCPG-MAS/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC767Test.php on line 63 and defined in /home/atlassian/bamboo/xml-data/build-dir/PHP-DOCPG-MAS/tests/Doctrine/Tests/Models/CMS/CmsUser.php on line 211

I wasn't able to replicate with other PHP versions. On PHP7, running tests/Doctrine/Tests/ORM/Functional/Ticket yields 20, 21 and 22 as group IDs, rather than 1, 2, 3. Maybe some cleanup isn't run?

Removing hardocoded IDs seems a sensible thing to do anyway.

The failure happens when running the full suite or even just:

phpunit tests/Doctrine/Tests/ORM/Functional/Ticket
@doctrinebot
Copy link

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DDC-3670

We use Jira to track the state of pull requests and the versions they got
included in.

@Ocramius
Copy link
Member

Ocramius commented Apr 6, 2015

The test is hardened correctly in any case.

At a first glance, this was a fragile test that was passing due to order of cleanups of other tests: merging.

@Ocramius Ocramius self-assigned this Apr 6, 2015
Ocramius added a commit that referenced this pull request Apr 6, 2015
Fix DDC767Test failing on php7 + pg94
@Ocramius Ocramius merged commit 2c90930 into doctrine:master Apr 6, 2015
@Ocramius
Copy link
Member

Ocramius commented Apr 6, 2015

Backported into 2.5 at 5843453

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants