Hi,

I'm trying to do this in a test:

public function testEntity($em)
{
    $entity = new Entity();
    $em->persist($entity);
    $em->flush();
}

The Entity has nothing special, i also use an activeEntity pattern,
with an EntityManager in a static property, but i think that static
properties aren't serialized, so all might be good.

I also use the run_isolated_test mode.

I have an error like this :

RuntimeException: PHP Fatal error:  Uncaught exception 'PDOException'
with message 'You cannot serialize or unserialize PDO instances' in -:
31
Stack trace:
#0 [internal function]: PDO->__sleep()
#1 -(31): serialize(Array)
#2 -(133): __phpunit_run_isolated_test()
#3 {main}

Next exception 'Exception' with message 'AppKernel::serialize() must
return a string or NULL' in -:31
Stack trace:
#0 -(0): serialize()
#1 -(133): __phpunit_run_isolated_test()
#2 {main}

Next exception 'Exception' with message 'Serialization of 'Closure' is
not allowed' in -:31
Stack trace:
#0 -(0): serialize()
#1 -(133): __phpunit_run_isolated_test()
#2 {main}

Next exception 'Exception' with message 'Serialization of 'Closure' is
not allowed' in -:31
Stack trace:
#0 -(0): serialize()
#1 -(133): __phpunit_run_isolated_test()
#2 {main}

Next exception 'Exception' with message 'Serialization of 'Closure' is
not allowed' in -:31
Stack trace:
#0 -(0): serialize()
#1 -(133): __phpunit_run_isolated_test()
#2 {main}

Next exception 'Exception' with message 'Symfony\Component\HttpF in -
on line 31


I don't understand at all what happened !
It's seems that the class: Symfony\Bundle\FrameworkBundle\Tests
\Command is responsible of this.
See line 31, there's a serialize function.


Maybe someone can help me ?

many thanks in advance

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to