"Class 'Doctrine\Tests\OrmFunctionalTestCase' not found" when trying to run PHPUnit #4984

Closed
opened 2026-01-22 14:55:15 +01:00 by admin · 10 comments
Owner

Originally created by @StanleySathler on GitHub (Jan 19, 2016).

Originally assigned to: @Ocramius on GitHub.

Guys, since I'm new as developer, I'm trying to participate on Open Source community.

I have here a Xubuntu 14.04, 64-bits. Already installed Apache2, MySQL and PHP5 (5.5.9). After forked the repository, I'm trying to run the unit tests... it is my first time with them.

I've been following these instructions, but when I type $ phpunit Doctrine/Tests/ORM/Functional/Locking/GearmanLockTest.php, I get this error:

PHP Fatal error: Class 'Doctrine\Tests\OrmFunctionalTestCase' not found in /var/www/html/doctrine2/tests/Doctrine/Tests/ORM/Functional/Locking/GearmanLockTest.php on line 14

I think that I'm missing something, because I already checked this class and its namespace and, theoretically, it exists.

Could someone help me? And I am sorry if I am making a foolish mistake.

Originally created by @StanleySathler on GitHub (Jan 19, 2016). Originally assigned to: @Ocramius on GitHub. Guys, since I'm new as developer, I'm trying to participate on Open Source community. I have here a Xubuntu 14.04, 64-bits. Already installed Apache2, MySQL and PHP5 (5.5.9). After forked the repository, I'm trying to run the unit tests... it is my first time with them. I've been following [these instructions](https://github.com/StanleySathler/doctrine2/tree/master/tests), but when I type **$ phpunit Doctrine/Tests/ORM/Functional/Locking/GearmanLockTest.php**, I get this error: _PHP Fatal error: Class 'Doctrine\Tests\OrmFunctionalTestCase' not found in /var/www/html/doctrine2/tests/Doctrine/Tests/ORM/Functional/Locking/GearmanLockTest.php on line 14_ I think that I'm missing something, because I already checked this class and its namespace and, theoretically, it exists. Could someone help me? And I am sorry if I am making a foolish mistake.
admin added the Documentation label 2026-01-22 14:55:15 +01:00
admin closed this issue 2026-01-22 14:55:17 +01:00
Author
Owner

@Ocramius commented on GitHub (Jan 19, 2016):

@StanleySathler

git clone git@github.com:doctrine/doctrine2.git
cd doctrine2
composer install
./vendor/bin/phpunit

Try that :-)

@Ocramius commented on GitHub (Jan 19, 2016): @StanleySathler ``` sh git clone git@github.com:doctrine/doctrine2.git cd doctrine2 composer install ./vendor/bin/phpunit ``` Try that :-)
Author
Owner

@Ocramius commented on GitHub (Jan 19, 2016):

Also, obviously requires patching those docs, I suppose :-\

@Ocramius commented on GitHub (Jan 19, 2016): Also, obviously requires patching those docs, I suppose :-\
Author
Owner

@StanleySathler commented on GitHub (Jan 19, 2016):

@Ocramius

I installed composer and its packages, but I don't have any idea of how patch these docs. Is it something like a class mapper? Could you send me any link that could me teach more about it?

@StanleySathler commented on GitHub (Jan 19, 2016): @Ocramius I installed composer and its packages, but I don't have any idea of how patch these docs. Is it something like a class mapper? Could you send me any link that could me teach more about it?
Author
Owner

@Ocramius commented on GitHub (Jan 20, 2016):

@StanleySathler if that snippet I gave you works (tests run), then you can simply edit tests/README.markdown and send it back at us (you can edit it directly from the github UI)

@Ocramius commented on GitHub (Jan 20, 2016): @StanleySathler if that snippet I gave you works (tests run), then you can simply edit [`tests/README.markdown`](https://github.com/doctrine/doctrine2/blob/a4d84e0cd8cc4ea1b99f4fd7d1d560f3fbe27c30/tests/README.markdown) and send it back at us (you can edit it directly from the github UI)
Author
Owner

@Jean85 commented on GitHub (Jan 20, 2016):

I did it ;)

@Jean85 commented on GitHub (Jan 20, 2016): I did it ;)
Author
Owner

@Ocramius commented on GitHub (Jan 20, 2016):

Linking #5623

@Ocramius commented on GitHub (Jan 20, 2016): Linking #5623
Author
Owner

@StanleySathler commented on GitHub (Jan 21, 2016):

Ocramius, the snippet didn't work. I'll try Jean's suggestions and I'll back with feedback.

@StanleySathler commented on GitHub (Jan 21, 2016): Ocramius, the snippet didn't work. I'll try Jean's suggestions and I'll back with feedback.
Author
Owner

@Jean85 commented on GitHub (Jan 21, 2016):

@StanleySathler , my snippet is the same, I just added that you need to install at least SQLite to have a green test suite to start with.

@Jean85 commented on GitHub (Jan 21, 2016): @StanleySathler , my snippet is the same, I just added that you need to install at least SQLite to have a green test suite to start with.
Author
Owner

@lcobucci commented on GitHub (Jun 22, 2017):

@Ocramius do we need to update anything here regarding this issue?

@lcobucci commented on GitHub (Jun 22, 2017): @Ocramius do we need to update anything here regarding this issue?
Author
Owner

@Ocramius commented on GitHub (Jun 22, 2017):

No, this is dealt with in https://github.com/doctrine/doctrine2/pull/5623

@Ocramius commented on GitHub (Jun 22, 2017): No, this is dealt with in https://github.com/doctrine/doctrine2/pull/5623
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4984