/** * @testdox unit test / object test: Test SqlServer object has Select proxy * @covers Zend\Db\Sql\Platform\SqlServer\SqlServer::__construct */ public function testConstruct() { $sqlServer = new SqlServer(); $decorators = $sqlServer->getDecorators(); list($type, $decorator) = each($decorators); $this->assertEquals('Zend\\Db\\Sql\\Select', $type); $this->assertInstanceOf('Zend\\Db\\Sql\\Platform\\SqlServer\\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(); }