예제 #1
0
 public function __construct($sql, $rows = array(), $updatedRows = array(), \Exception $exception = null)
 {
     parent::__construct($sql, $rows, $exception);
     if (count($rows) != count($updatedRows) && count($updatedRows) > 0) {
         throw new Exception("Row count for rows and updated rows should be the same");
     }
     foreach ($updatedRows as $row) {
         if (!$row instanceof Row) {
             throw new Exception("Row is not an instance of PDOMocker\\Row");
         }
     }
     $this->updatedRows = $updatedRows;
 }
예제 #2
0
 public function registerQuery(Query $query)
 {
     $this->queries[$query->getSql()] = $query;
     return $this;
 }