Ejemplo n.º 1
0
 /**
  * Returns database object
  *
  * @param int $iFetchMode - fetch mode default numeric - 0
  *
  * @throws oxConnectionException error while initiating connection to DB
  *
  * @return oxLegacyDb
  */
 public static function getDb($iFetchMode = oxDb::FETCH_MODE_NUM)
 {
     $db = Factory::create('\\oxLegacyDb')->getMock();
     $db->shouldIgnoreMissing();
     $db->shouldReceive()->andReturn();
     foreach (self::$receiveAndReturns as $receiveAndReturn) {
         list($receive, $return) = $receiveAndReturn;
         $db->shouldReceive($receive)->andReturn($return);
     }
     return $db;
 }
Ejemplo n.º 2
0
 public function testProvisioningOxidModel()
 {
     $mock = Factory::create('\\oxArticle')->useProvisioning()->getMock();
     $this->assertInstanceOf('\\oxField', $mock->oxarticles__oxid);
 }