Skip to content

Commit

Permalink
refactor: use Nowdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Jan 29, 2021
1 parent a75cd25 commit 00b2c3f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/system/Database/Builder/DeleteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ public function testGetCompiledDelete()
$builder->where('id', 1);
$sql = $builder->getCompiledDelete();

$expectedSQL = 'DELETE FROM "jobs"'
. "\n" . 'WHERE "id" = 1';
$expectedSQL = <<<'EOL'
DELETE FROM "jobs"
WHERE "id" = 1
EOL;
$this->assertEquals($expectedSQL, $sql);
}

Expand All @@ -53,8 +55,10 @@ public function testGetCompiledDeleteWithLimit()

$sql = $builder->where('id', 1)->limit(10)->getCompiledDelete();

$expectedSQL = 'DELETE FROM "jobs"'
. "\n" . 'WHERE "id" = 1 LIMIT 10';
$expectedSQL = <<<'EOL'
DELETE FROM "jobs"
WHERE "id" = 1 LIMIT 10
EOL;
$this->assertEquals($expectedSQL, $sql);
}
}

0 comments on commit 00b2c3f

Please sign in to comment.