On Tue, Jun 14, 2011 at 12:52 PM, waldo2188 <[email protected]> wrote:
> Hi,
>
> I wish to know how i can execute some DQL(Doctrine Query Language)
> from a unit test file.
>
> I just want to have access to my Entity for test some function.
>
> The unit test will be run with PHPUnit.
>
>
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class TestCase extends WebTestCase
{
public function testSomeStuff() {
$em = $this->getService('doctrine')->getEntityManager();
}
}
Disclaimer: There may be a better class to inherit from, or a better way to
do this.
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en