/** * @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); }
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(); }
public function __construct() { $this->setTypeDecorator(AlterTable::class, new Ddl\AlterTableDecorator()); $this->setTypeDecorator(CreateTable::class, new Ddl\CreateTableDecorator()); parent::__construct(); }