Issues (12)

tests/Query/Postgres/UpdateTest.php (1 issue)

Severity
1
<?php
2
3
namespace Latitude\QueryBuilder\Query\Postgres;
4
5
use Latitude\QueryBuilder\TestCase;
6
7
class UpdateTest extends TestCase
8
{
9
    use PostgresEngineSetup;
10
11
    public function testReturning()
12
    {
13
        $update = $this->factory
14
            ->update('users', [
15
                'last_login' => null
16
            ])
17
            ->returning('id');
0 ignored issues
show
The method returning() does not exist on Latitude\QueryBuilder\Query\UpdateQuery. Maybe you want to declare this class abstract? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

17
            ->/** @scrutinizer ignore-call */ returning('id');
Loading history...
18
19
        $this->assertSql('UPDATE "users" SET "last_login" = NULL RETURNING "id"', $update);
20
        $this->assertParams([], $update);
21
    }
22
}
23