Exemplo n.º 1
0
 /**
  * @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);
 }
Exemplo n.º 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();
 }