public function testGetParentOrCreateExisting() { $article = new ConcreteArticle(); $article->save(); ConcreteContentTableMap::clearInstancePool(); $content = $article->getParentOrCreate(); $this->assertTrue($content instanceof ConcreteContent, 'getParentOrCreate() returns an instance of the parent class'); $this->assertFalse($content->isNew(), 'getParentOrCreate() returns an existing instance of the parent class if the object is persisted'); $this->assertEquals($article->getId(), $content->getId(), 'getParentOrCreate() returns the parent object related to the current object'); }