Issues (12)

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

Severity
1
<?php
2
3
namespace Latitude\QueryBuilder\Query\Postgres;
4
5
use Latitude\QueryBuilder\TestCase;
6
7
class InsertTest extends TestCase
8
{
9
    use PostgresEngineSetup;
10
11
    public function testReturning()
12
    {
13
        $insert = $this->factory
14
            ->insert('users', [
15
                'username' => 'james',
16
            ])
17
            ->returning('id');
0 ignored issues
show
The method returning() does not exist on Latitude\QueryBuilder\Query\InsertQuery. 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('INSERT INTO "users" ("username") VALUES (?) RETURNING "id"', $insert);
20
        $this->assertParams(['james'], $insert);
21
    }
22
}
23