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

Namespace problem with Form Type #79

Open
bolbo opened this issue Dec 15, 2014 · 0 comments
Open

Namespace problem with Form Type #79

bolbo opened this issue Dec 15, 2014 · 0 comments

Comments

@bolbo
Copy link

bolbo commented Dec 15, 2014

Hi,
I have a Symfony2.6 application with a form Type in src/Acme/DemoBundle/Form/Type/ArticleType.php

When I write the test for this form type, I create file src/Acme/DemoBundle/Tests/Units/Form/Type/ArticleTypeTest.php
In this file, if I set namespace:
namespace Acme\DemoBundle\Tests\Units\Form\Type;

and I run the test I have this error:

Running duration: 6.71 seconds.
Failure (2 tests, 1/2 methods, 1 void method, 0 skipped method, 0 uncompleted method, 0 failure, 1 error, 0 exception)!

There is 1 error:
=> Acme\DemoBundle\Tests\Units\Form\Type\ArticleType::testFormType():
==> Error E_USER_ERROR in /sf2-propel-atoum/src/Acme/DemoBundle/Tests/Units/Form/Type/ArticleTypeTest.php on unknown line, generated by unknown file:
Tested class 'Acme\DemoBundle\Units\Form\Type\ArticleType' does not exist for test class 'Acme\DemoBundle\Tests\Units\Form\Type\ArticleType'

If I set namespace: namespace Acme\DemoBundle\Tests\Form\Type;
there is no error

https://github.com/lbol/sf2-propel-atoum/blob/master/src/Acme/DemoBundle/Form/Type/ArticleType.php
https://github.com/lbol/sf2-propel-atoum/blob/master/src/Acme/DemoBundle/Tests/Units/Form/Type/ArticleTypeTest.php

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

No branches or pull requests

1 participant