當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AbstractPlatform::expects方法代碼示例

本文整理匯總了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'));
 }
開發者ID:Maksold,項目名稱:platform,代碼行數:7,代碼來源:UTCTimeTypeTest.php

示例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();
 }
開發者ID:skafandri,項目名稱:phone-number-bundle,代碼行數:7,代碼來源:PhoneNumberTypeTest.php

示例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());
 }
開發者ID:selimcr,項目名稱:servigases,代碼行數:16,代碼來源:CreateSchemaSqlCollectorTest.php

示例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');
 }
開發者ID:scr-be,項目名稱:arthur-doctrine-uuid-library,代碼行數:6,代碼來源:StringUuidTypeTest.php


注:本文中的Doctrine\DBAL\Platforms\AbstractPlatform::expects方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。