DDC1043Test.php 876 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace Doctrine\Tests\ORM\Functional\Ticket;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. require_once __DIR__ . '/../../../TestInit.php';
  5. /**
  6. * @group DDC-1043
  7. */
  8. class DDC1043Test extends \Doctrine\Tests\OrmFunctionalTestCase
  9. {
  10. public function setUp()
  11. {
  12. $this->useModelSet('cms');
  13. parent::setUp();
  14. }
  15. public function testChangeSetPlusWeirdPHPCastingIntCastingRule()
  16. {
  17. $user = new \Doctrine\Tests\Models\CMS\CmsUser();
  18. $user->name = "John Galt";
  19. $user->username = "jgalt";
  20. $user->status = "+44";
  21. $this->_em->persist($user);
  22. $this->_em->flush();
  23. $user->status = "44";
  24. $this->_em->flush();
  25. $this->_em->clear();
  26. $user = $this->_em->find("Doctrine\Tests\Models\CMS\CmsUser", $user->id);
  27. $this->assertSame("44", $user->status);
  28. }
  29. }