Beispiel #1
0
 /**
  * @dataProvider constructorDataProvider
  *
  * @param string $query
  * @param string $name
  */
 public function testFactory($query, $name)
 {
     $instance = Query::delete($name);
     $this->assertSame($query, $instance->build());
     $this->assertSame([], $instance->getData());
 }
Beispiel #2
0
 /**
  * @dataProvider constructorDataProvider
  *
  * @param string $query
  * @param string $expr
  * @param mixed  $data
  * @param array  $expected_data
  */
 public function testFactory($query, $expr, $data, array $expected_data)
 {
     $instance = Query::select($expr, $data);
     $this->assertSame($query, $instance->build());
     $this->assertSame($expected_data, $instance->getData());
 }
Beispiel #3
0
 /**
  * @dataProvider valuesProvider
  *
  * @param string $query
  * @param array  $values
  * @param array  $data
  */
 public function testFactoryWithData($query, array $values, array $data)
 {
     $instance = Query::update('foo', $values);
     $this->assertSame($query, $instance->build());
     $this->assertSame($data, $instance->getData());
 }