/** * @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()); }
/** * @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()); }
/** * @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()); }