/** * @dataProvider dataAddOrderBy * * @param string $sort2 * @param string $order2 * @param string $order1 * @param array $expectedQueryPart * @param string $expectedQuery */ public function testAddOrderBy($sort2, $order2, $order1, $expectedQueryPart, $expectedQuery) { $this->queryBuilder->orderBy('column1', $order1); $this->queryBuilder->addOrderBy($sort2, $order2); $this->assertEquals($expectedQueryPart, $this->queryBuilder->getQueryPart('orderBy')); $this->assertSame('SELECT FROM ' . $expectedQuery, $this->queryBuilder->getSQL()); }