| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | public function testDeleteComplex() |
||
| 13 | { |
||
| 14 | $sql = (string)$this->getSut('foo') |
||
| 15 | ->addModifier(Delete::LOW_PRIORITY, Delete::QUICK, Delete::IGNORE) |
||
| 16 | ->addWhere('foo.bar = "foo-bar"', new Expr('bar.foo = ?', ['bar-foo'])) |
||
| 17 | ->addOrderBy('bar.baz', 'DESC') |
||
| 18 | ->setLimit(10); |
||
| 19 | |||
| 20 | $parts = []; |
||
| 21 | $parts[] = 'DELETE LOW_PRIORITY QUICK IGNORE FROM foo'; |
||
| 22 | $parts[] = 'WHERE foo.bar = "foo-bar" AND bar.foo = ?'; |
||
| 23 | $parts[] = 'ORDER BY bar.baz DESC'; |
||
| 24 | $parts[] = 'LIMIT 10'; |
||
| 25 | |||
| 26 | $expectedSql = implode(PHP_EOL, $parts); |
||
| 27 | |||
| 28 | $this->assertSame($expectedSql, $sql); |
||
| 29 | } |
||
| 41 |