本文整理匯總了PHP中Doctrine\Tests\OrmFunctionalTestCase::setup方法的典型用法代碼示例。如果您正苦於以下問題:PHP OrmFunctionalTestCase::setup方法的具體用法?PHP OrmFunctionalTestCase::setup怎麽用?PHP OrmFunctionalTestCase::setup使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Doctrine\Tests\OrmFunctionalTestCase
的用法示例。
在下文中一共展示了OrmFunctionalTestCase::setup方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setup
protected function setup()
{
parent::setup();
try {
$this->_schemaTool->createSchema(array($this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2230User'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2230Address')));
} catch (ToolsException $e) {
}
}
示例2: setup
/**
* {@inheritDoc}
*/
protected function setup()
{
parent::setup();
$platform = $this->_em->getConnection()->getDatabasePlatform();
if (!$platform->supportsSchemas() && !$platform->canEmulateSchemas()) {
$this->markTestSkipped("This test is only useful for databases that support schemas or can emulate them.");
}
}
示例3: setup
/**
* {@inheritDoc}
*/
protected function setup()
{
parent::setup();
try {
$this->_schemaTool->createSchema(array($this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2692Foo')));
} catch (\Exception $e) {
return;
}
$this->_em->clear();
}
示例4: setup
/**
* {@inheritDoc}
*/
protected function setup()
{
parent::setup();
try {
$this->_schemaTool->createSchema(array($this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2660Product'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2660Customer'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2660CustomerOrder')));
} catch (\Exception $e) {
return;
}
for ($i = 0; $i < 5; $i++) {
$product = new DDC2660Product();
$customer = new DDC2660Customer();
$order = new DDC2660CustomerOrder($product, $customer, 'name' . $i);
$this->_em->persist($product);
$this->_em->persist($customer);
$this->_em->flush();
$this->_em->persist($order);
$this->_em->flush();
}
$this->_em->clear();
}
示例5: setup
/**
* {@inheritDoc}
*/
protected function setup()
{
parent::setup();
try {
$this->_schemaTool->createSchema(array($this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2759Qualification'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2759Category'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2759QualificationMetadata'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2759MetadataCategory')));
} catch (\Exception $e) {
return;
}
$qualification = new DDC2759Qualification();
$qualificationMetadata = new DDC2759QualificationMetadata($qualification);
$category1 = new DDC2759Category();
$category2 = new DDC2759Category();
$metadataCategory1 = new DDC2759MetadataCategory($qualificationMetadata, $category1);
$metadataCategory2 = new DDC2759MetadataCategory($qualificationMetadata, $category2);
$this->_em->persist($qualification);
$this->_em->persist($qualificationMetadata);
$this->_em->persist($category1);
$this->_em->persist($category2);
$this->_em->persist($metadataCategory1);
$this->_em->persist($metadataCategory2);
$this->_em->flush();
$this->_em->clear();
}
示例6: setup
/**
* {@inheritDoc}
*/
protected function setup()
{
parent::setup();
$this->_schemaTool->createSchema(array($this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC3170AbstractEntityJoined'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC3170ProductJoined'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC3170AbstractEntitySingleTable'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC3170ProductSingleTable')));
}
示例7: setup
protected function setup()
{
parent::setup();
$this->_schemaTool->createSchema(array($this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2256User'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2256Group')));
}
示例8: setup
/**
* {@inheritDoc}
*/
protected function setup()
{
parent::setup();
$this->_schemaTool->createSchema(array($this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2346Foo'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2346Bar'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2346Baz')));
$this->logger = new DebugStack();
}