/**
  * @test
  */
 public function shouldReturnPreparedAttributes()
 {
     //given
     $queryInsert = new QueryInsert(array('first_name' => 'John', 'last_name' => 'Doe'));
     //when
     $attributes = $queryInsert->getAttributes();
     //then
     $this->assertEquals(array(array('name' => 'first_name', 'value' => 'John'), array('name' => 'last_name', 'value' => 'Doe')), $attributes);
 }
Ejemplo n.º 2
0
 public function delete()
 {
     $attributes = Arrays::map($this->whereClauses, Functions::extract()->getParams());
     $queryInsert = new QueryInsert(Arrays::firstOrNull($attributes));
     $id = $queryInsert->into($this->module->getModuleName());
     return !is_null($id);
 }