Remove commented code that seems to not be important
This commit is contained in:
parent
62d122bd54
commit
ba9fecc43f
@ -50,7 +50,6 @@ class BasicFunctionalTest extends OrmFunctionalTestCase
|
||||
$this->_em->flush();
|
||||
$this->assertTrue($this->_em->contains($ph));
|
||||
$this->assertTrue($this->_em->contains($user));
|
||||
//$this->assertInstanceOf('Doctrine\ORM\PersistentCollection', $user->phonenumbers);
|
||||
|
||||
// Update name
|
||||
$user->name = 'guilherme';
|
||||
@ -96,8 +95,6 @@ class BasicFunctionalTest extends OrmFunctionalTestCase
|
||||
$this->_em->persist($user);
|
||||
$this->_em->flush();
|
||||
|
||||
//$this->assertInstanceOf('Doctrine\ORM\PersistentCollection', $user->phonenumbers);
|
||||
|
||||
// Remove the first element from the collection
|
||||
unset($user->phonenumbers[0]);
|
||||
$ph1->user = null; // owning side!
|
||||
@ -283,7 +280,6 @@ class BasicFunctionalTest extends OrmFunctionalTestCase
|
||||
$this->assertInstanceOf(PersistentCollection::class, $users[0]->phonenumbers);
|
||||
$this->assertTrue($users[0]->phonenumbers->isInitialized());
|
||||
$this->assertEquals(0, $users[0]->phonenumbers->count());
|
||||
//$this->assertNull($users[0]->articles);
|
||||
}
|
||||
|
||||
public function testBasicRefresh()
|
||||
@ -512,9 +508,6 @@ class BasicFunctionalTest extends OrmFunctionalTestCase
|
||||
// that address to the user without actually loading it, using getReference().
|
||||
$addressRef = $this->_em->getReference(CmsAddress::class, $address->getId());
|
||||
|
||||
//$addressRef->getId();
|
||||
//\Doctrine\Common\Util\Debug::dump($addressRef);
|
||||
|
||||
$user->setAddress($addressRef); // Ugh! Initializes address 'cause of $address->setUser($user)!
|
||||
|
||||
$this->_em->flush();
|
||||
@ -761,7 +754,6 @@ class BasicFunctionalTest extends OrmFunctionalTestCase
|
||||
*/
|
||||
public function testNewAssociatedEntityDuringFlushThrowsException2()
|
||||
{
|
||||
//$this->_em->getConnection()->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger);
|
||||
$user = new CmsUser();
|
||||
$user->username = "beberlei";
|
||||
$user->name = "Benjamin E.";
|
||||
@ -796,7 +788,6 @@ class BasicFunctionalTest extends OrmFunctionalTestCase
|
||||
*/
|
||||
public function testNewAssociatedEntityDuringFlushThrowsException3()
|
||||
{
|
||||
//$this->_em->getConnection()->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger);
|
||||
$art = new CmsArticle();
|
||||
$art->topic = 'topic';
|
||||
$art->text = 'the text';
|
||||
@ -954,7 +945,6 @@ class BasicFunctionalTest extends OrmFunctionalTestCase
|
||||
*/
|
||||
public function testOneToOneMergeSetNull()
|
||||
{
|
||||
//$this->_em->getConnection()->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger);
|
||||
$user = new CmsUser();
|
||||
$user->username = "beberlei";
|
||||
$user->name = "Benjamin E.";
|
||||
|
@ -137,7 +137,6 @@ class ClassTableInheritanceTest extends OrmFunctionalTestCase
|
||||
$this->assertEquals(100000, $person->getSalary());
|
||||
$this->assertEquals('CTO', $person->getTitle());
|
||||
$this->assertTrue(is_numeric($person->getId()));
|
||||
//$this->assertInstanceOf('Doctrine\Tests\Models\Company\CompanyCar', $person->getCar());
|
||||
}
|
||||
|
||||
public function testSelfReferencingOneToOne() {
|
||||
|
@ -31,8 +31,6 @@ class NotifyPolicyTest extends OrmFunctionalTestCase
|
||||
|
||||
public function testChangeTracking()
|
||||
{
|
||||
//$this->_em->getConnection()->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger);
|
||||
|
||||
$user = new NotifyUser();
|
||||
$group = new NotifyGroup();
|
||||
$user->setName('roman');
|
||||
|
@ -95,28 +95,4 @@ class PersistentCollectionCriteriaTest extends OrmFunctionalTestCase
|
||||
$this->assertCount(1, $tweets);
|
||||
$this->assertFalse($tweets->isInitialized());
|
||||
}
|
||||
|
||||
/*public function testCanCountWithoutLoadingManyToManyPersistentCollection()
|
||||
{
|
||||
$this->loadQuoteFixture();
|
||||
|
||||
$repository = $this->_em->getRepository('Doctrine\Tests\Models\Quote\User');
|
||||
|
||||
$user = $repository->findOneBy(array('name' => 'mgal'));
|
||||
$groups = $user->groups->matching(new Criteria());
|
||||
|
||||
$this->assertInstanceOf('Doctrine\ORM\LazyManyToManyCriteriaCollection', $groups);
|
||||
$this->assertFalse($groups->isInitialized());
|
||||
$this->assertCount(2, $groups);
|
||||
$this->assertFalse($groups->isInitialized());
|
||||
|
||||
// Make sure it works with constraints
|
||||
$criteria = new Criteria(Criteria::expr()->eq('name', 'quote1'));
|
||||
$groups = $user->groups->matching($criteria);
|
||||
|
||||
$this->assertInstanceOf('Doctrine\ORM\LazyManyToManyCriteriaCollection', $groups);
|
||||
$this->assertFalse($groups->isInitialized());
|
||||
$this->assertCount(1, $groups);
|
||||
$this->assertFalse($groups->isInitialized());
|
||||
}*/
|
||||
}
|
||||
|
@ -13,7 +13,6 @@ class DDC144Test extends OrmFunctionalTestCase
|
||||
$this->_schemaTool->createSchema(
|
||||
[
|
||||
$this->_em->getClassMetadata(DDC144FlowElement::class),
|
||||
// $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC144Expression'),
|
||||
$this->_em->getClassMetadata(DDC144Operand::class),
|
||||
]
|
||||
);
|
||||
|
@ -42,13 +42,6 @@ class DDC3330Test extends OrmFunctionalTestCase
|
||||
|
||||
$paginator = new Paginator($query, true);
|
||||
|
||||
/*foreach ($paginator as $building) {
|
||||
echo 'BUILDING ID: '.$building->id."\n";
|
||||
foreach ($building->halls as $hall) {
|
||||
echo ' - HALL: '.$hall->id.' - '.$hall->name."\n";
|
||||
}
|
||||
}*/
|
||||
|
||||
$this->assertEquals(3, count(iterator_to_array($paginator)), 'Count is not correct for pagination');
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,6 @@ class DDC425Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
$this->_schemaTool->createSchema(
|
||||
[
|
||||
$this->_em->getClassMetadata(DDC425Entity::class),
|
||||
//$this->_em->getClassMetadata(__NAMESPACE__ . '\DDC425Other')
|
||||
]
|
||||
);
|
||||
}
|
||||
|
@ -31,8 +31,6 @@ class DDC522Test extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
*/
|
||||
public function testJoinColumnWithSameNameAsAssociationField()
|
||||
{
|
||||
//$this->_em->getConnection()->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger);
|
||||
|
||||
$cust = new DDC522Customer;
|
||||
$cust->name = "name";
|
||||
$cart = new DDC522Cart;
|
||||
|
@ -1223,70 +1223,6 @@ class ObjectHydratorTest extends HydrationTestCase
|
||||
$this->assertEquals(0, $result[1]['user']->articles->count());
|
||||
}
|
||||
|
||||
/**
|
||||
* SELECT PARTIAL u.{id,status}, a.id, a.topic, c.id as cid, c.topic as ctopic
|
||||
* FROM CmsUser u
|
||||
* LEFT JOIN u.articles a
|
||||
* LEFT JOIN a.comments c
|
||||
*
|
||||
* @group bubu
|
||||
* @dataProvider provideDataForUserEntityResult
|
||||
*/
|
||||
/*public function testChainedJoinWithScalars($userEntityKey)
|
||||
{
|
||||
$rsm = new ResultSetMapping;
|
||||
$rsm->addEntityResult('Doctrine\Tests\Models\CMS\CmsUser', 'u', $userEntityKey ?: null);
|
||||
$rsm->addFieldResult('u', 'u__id', 'id');
|
||||
$rsm->addFieldResult('u', 'u__status', 'status');
|
||||
$rsm->addScalarResult('a__id', 'id');
|
||||
$rsm->addScalarResult('a__topic', 'topic');
|
||||
$rsm->addScalarResult('c__id', 'cid');
|
||||
$rsm->addScalarResult('c__topic', 'ctopic');
|
||||
|
||||
// Faked result set
|
||||
$resultSet = array(
|
||||
//row1
|
||||
array(
|
||||
'u__id' => '1',
|
||||
'u__status' => 'developer',
|
||||
'a__id' => '1',
|
||||
'a__topic' => 'The First',
|
||||
'c__id' => '1',
|
||||
'c__topic' => 'First Comment'
|
||||
),
|
||||
array(
|
||||
'u__id' => '1',
|
||||
'u__status' => 'developer',
|
||||
'a__id' => '1',
|
||||
'a__topic' => 'The First',
|
||||
'c__id' => '2',
|
||||
'c__topic' => 'Second Comment'
|
||||
),
|
||||
array(
|
||||
'u__id' => '1',
|
||||
'u__status' => 'developer',
|
||||
'a__id' => '42',
|
||||
'a__topic' => 'The Answer',
|
||||
'c__id' => null,
|
||||
'c__topic' => null
|
||||
),
|
||||
);
|
||||
|
||||
$stmt = new HydratorMockStatement($resultSet);
|
||||
$hydrator = new \Doctrine\ORM\Internal\Hydration\ObjectHydrator($this->_em);
|
||||
$result = $hydrator->hydrateAll($stmt, $rsm, array(Query::HINT_FORCE_PARTIAL_LOAD => true));
|
||||
|
||||
\Doctrine\Common\Util\Debug::dump($result, 3);
|
||||
|
||||
$this->assertEquals(1, count($result));
|
||||
|
||||
$this->assertInstanceOf('Doctrine\Tests\Models\CMS\CmsUser', $result[0][$userEntityKey]); // User object
|
||||
$this->assertEquals(42, $result[0]['id']);
|
||||
$this->assertEquals('The First', $result[0]['topic']);
|
||||
$this->assertEquals(1, $result[0]['cid']);
|
||||
$this->assertEquals('First Comment', $result[0]['ctopic']);
|
||||
}*/
|
||||
|
||||
/**
|
||||
* SELECT PARTIAL u.{id, name}
|
||||
* FROM Doctrine\Tests\Models\CMS\CmsUser u
|
||||
|
@ -127,7 +127,6 @@ class ClassMetadataTest extends OrmTestCase
|
||||
);
|
||||
|
||||
$assoc = $cm->associationMappings['groups'];
|
||||
//$this->assertInstanceOf('Doctrine\ORM\Mapping\ManyToManyMapping', $assoc);
|
||||
$this->assertEquals(
|
||||
[
|
||||
'name' => 'cmsuser_cmsgroup',
|
||||
|
Loading…
x
Reference in New Issue
Block a user