Exemplo n.º 1
0
 /**
  * @param Update $update
  *
  * @return string
  */
 public function writeUpdateValues(Update $update)
 {
     $assigns = array();
     foreach ($update->getValues() as $column => $value) {
         $newColumn = array($column);
         $column = $this->columnWriter->writeColumn(SyntaxFactory::createColumn($newColumn, $update->getTable()));
         $value = $this->writer->writePlaceholderValue($value);
         $assigns[] = "{$column} = {$value}";
     }
     return implode(", ", $assigns);
 }
Exemplo n.º 2
0
 /**
  * @test
  */
 public function itShouldReturnValues()
 {
     $values = ['user_id' => 1];
     $this->query->setValues($values);
     $this->assertSame($values, $this->query->getValues());
 }