本文整理汇总了PHP中Doctrine\DBAL\Platforms\AbstractPlatform::expects方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractPlatform::expects方法的具体用法?PHP AbstractPlatform::expects怎么用?PHP AbstractPlatform::expects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doctrine\DBAL\Platforms\AbstractPlatform
的用法示例。
在下文中一共展示了AbstractPlatform::expects方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
protected function setUp()
{
// class has private constructor
$this->type = $this->getMockBuilder('Oro\\Bundle\\LocaleBundle\\DoctrineExtensions\\DBAL\\Types\\UTCTimeType')->setMethods(null)->disableOriginalConstructor()->getMock();
$this->platform = $this->getMockBuilder('Doctrine\\DBAL\\Platforms\\AbstractPlatform')->disableOriginalConstructor()->setMethods(array('getTimeFormatString'))->getMockForAbstractClass();
$this->platform->expects($this->any())->method('getTimeFormatString')->will($this->returnValue('H:i:s'));
}
示例2: setUp
protected function setUp()
{
$this->platform = $this->getMockBuilder('Doctrine\\DBAL\\Platforms\\AbstractPlatform')->setMethods(array('getVarcharTypeDeclarationSQL'))->getMockForAbstractClass();
$this->platform->expects($this->any())->method('getVarcharTypeDeclarationSQL')->will($this->returnValue('DUMMYVARCHAR()'));
$this->type = Type::getType('phone_number');
$this->phoneNumberUtil = PhoneNumberUtil::getInstance();
}
示例3: testResetsQueries
public function testResetsQueries()
{
foreach (array('supportsSchemas', 'supportsForeignKeys') as $method) {
$this->platformMock->expects($this->any())->method($method)->will($this->returnValue(true));
}
$table = $this->createTableMock();
$foreignKey = $this->createForeignKeyConstraintMock();
$sequence = $this->createSequenceMock();
$this->visitor->acceptNamespace('foo');
$this->visitor->acceptTable($table);
$this->visitor->acceptForeignKey($table, $foreignKey);
$this->visitor->acceptSequence($sequence);
$this->assertNotEmpty($this->visitor->getQueries());
$this->visitor->resetQueries();
$this->assertEmpty($this->visitor->getQueries());
}
示例4: setUp
protected function setUp()
{
$this->platform = $this->getMockBuilder('Doctrine\\DBAL\\Platforms\\AbstractPlatform')->setMethods(array('getGuidTypeDeclarationSQL'))->getMockForAbstractClass();
$this->platform->expects($this->any())->method('getGuidTypeDeclarationSQL')->will($this->returnValue('DUMMYVARCHAR()'));
$this->type = Type::getType('str_uuid');
}