Skip to content

Stack Overflow Exception when running Symfony WebTestsΒ #1

@fogs

Description

@fogs

First of all: thanks a lot for the great Eclipse Plugin!

Recently, I stumbled across a bug: when running a Symfony WebTest using PTI, I can see PTI starting in the Progress View but being stuck at 0%. After a while I get the following error message:

An internal error occurred during: "PHPUnit".
java.lang.StackOverflowError

The Eclipse log contains vast amounts of these two lines:

    at org.phpsrc.eclipse.pti.core.PHPToolkitUtil.hasSuperClass(PHPToolkitUtil.java:418)
    at org.phpsrc.eclipse.pti.core.PHPToolkitUtil.hasSuperClass(PHPToolkitUtil.java:391)

A regular PHPUnit_Framework_TestCase in the same project works fine.

A Symfony WebTest looks like this:

namespace Acme\DemoBundle\Tests\Controller;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class DemoControllerTest extends WebTestCase
{
    [..]
}

The parent class WebTestCase looks like this:
https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php

If I understand PTI's code right, PHPToolkitUtil tries to find the right Superclass. Unfortunately, the class name WebTestCase exists several times in the project.

After renaming above mentioned WebTestCase class to WebTestCase2 (in my test case and the class itself), it works fine. However, this looks more like an issue that needs to be fixed within PTI rather than changing Symfony code. Duplicate class names should not be the problem, thats what namespaces are there for.

Let me know if you need more information on this issue.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions