Created
September 23, 2014 07:26
-
-
Save bramstroker/74ec18a56e9bcd822bb0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$class = Mockery::mock('Doctrine\ORM\ClassMetadata'); | |
include '/mypath/doctrine/orm/lib/Doctrine/ORM/Query.php'; | |
?> | |
Now I get the following error message: | |
Fatal error: Cannot use Doctrine\ORM\Mapping\ClassMetadata as ClassMetadata because the name is already in use in Query.php on line 29 | |
This line contains a namespace import: | |
use Doctrine\ORM\Mapping\ClassMetadata; | |
When I mock the ClassMetadata with the correct namespace I don't get a error | |
<?php | |
$class = Mockery::mock('Doctrine\ORM\Mapping\ClassMetadata'); | |
include '/mypath/doctrine/orm/lib/Doctrine/ORM/Query.php'; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment