예제 #1
0
파일: MysqlTest.php 프로젝트: nieldm/zf2
 /**
  * @testdox unit test / object test: Test Mysql object has Select proxy
  * @covers Zend\Db\Sql\Platform\Mysql\Mysql::__construct
  */
 public function testConstruct()
 {
     $mysql = new Mysql();
     $decorators = $mysql->getDecorators();
     list($type, $decorator) = each($decorators);
     $this->assertEquals('Zend\\Db\\Sql\\Select', $type);
     $this->assertInstanceOf('Zend\\Db\\Sql\\Platform\\Mysql\\SelectDecorator', $decorator);
 }
예제 #2
0
 public function __construct(AdapterInterface $adapter)
 {
     $this->defaultPlatform = $adapter->getPlatform();
     $mySqlPlatform = new Mysql\Mysql();
     $sqlServerPlatform = new SqlServer\SqlServer();
     $oraclePlatform = new Oracle\Oracle();
     $ibmDb2Platform = new IbmDb2\IbmDb2();
     $this->decorators['mysql'] = $mySqlPlatform->getDecorators();
     $this->decorators['sqlserver'] = $sqlServerPlatform->getDecorators();
     $this->decorators['oracle'] = $oraclePlatform->getDecorators();
     $this->decorators['ibmdb2'] = $ibmDb2Platform->getDecorators();
 }
예제 #3
0
 public function __construct()
 {
     $this->setTypeDecorator(AlterTable::class, new Ddl\AlterTableDecorator());
     $this->setTypeDecorator(CreateTable::class, new Ddl\CreateTableDecorator());
     parent::__construct();
 }