Skip to content

Commit

Permalink
Adding to inheritance test.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwage committed Sep 3, 2010
1 parent d427a6a commit 54f68d9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
Expand Up @@ -67,6 +67,14 @@ public function testSingleCollectionInhertiance()

$document = $this->dm->findOne('Documents\SubProject', array('name' => 'Sub Project'));
$this->assertInstanceOf('Documents\SubProject', $document);

$document = $this->dm->findOne('Documents\Project', array('name' => 'Sub Project'));
$this->assertInstanceOf('Documents\SubProject', $document);
$this->dm->clear();

$id = $document->getId();
$document = $this->dm->find('Documents\Project', $id);
$this->assertInstanceOf('Documents\SubProject', $document);
}

public function testPrePersistIsCalledFromMappedSuperClass()
Expand Down
15 changes: 10 additions & 5 deletions tests/Doctrine/ODM/MongoDB/Tests/Mapping/Driver/XmlDriverTest.php
Expand Up @@ -74,7 +74,8 @@ public function testCreateXmlDriver()
'isCascadePersist' => false,
'isCascadeRefresh' => false,
'isCascadeRemove' => false,
'nullable' => false
'nullable' => false,
'strategy' => 'pushPull'
), $classMetadata->fieldMappings['address']);

$this->assertEquals(array(
Expand All @@ -89,7 +90,8 @@ public function testCreateXmlDriver()
'isCascadePersist' => false,
'isCascadeRefresh' => false,
'isCascadeRemove' => false,
'nullable' => false
'nullable' => false,
'strategy' => 'pushPull'
), $classMetadata->fieldMappings['phonenumbers']);

$this->assertEquals(array(
Expand All @@ -104,7 +106,8 @@ public function testCreateXmlDriver()
'isCascadePersist' => true,
'isCascadeRefresh' => true,
'isCascadeRemove' => true,
'nullable' => false
'nullable' => false,
'strategy' => 'pushPull'
), $classMetadata->fieldMappings['profile']);

$this->assertEquals(array(
Expand All @@ -119,7 +122,8 @@ public function testCreateXmlDriver()
'isCascadePersist' => true,
'isCascadeRefresh' => true,
'isCascadeRemove' => true,
'nullable' => false
'nullable' => false,
'strategy' => 'pushPull'
), $classMetadata->fieldMappings['account']);

$this->assertEquals(array(
Expand All @@ -134,7 +138,8 @@ public function testCreateXmlDriver()
'isCascadePersist' => true,
'isCascadeRefresh' => true,
'isCascadeRemove' => true,
'nullable' => false
'nullable' => false,
'strategy' => 'pushPull'
), $classMetadata->fieldMappings['groups']);

$this->assertEquals(array(
Expand Down

0 comments on commit 54f68d9

Please sign in to comment.