Completed
Push — ezp-31420-merge-up ( ec14fb...141a64 )
by
unknown
40:13 queued 27:42
created

InsertDoctrineQueryTest::testGenerateInsertQuery()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 13
rs 9.8333
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
5
 * @license For full copyright and license information view LICENSE file distributed with this source code.
6
 */
7
namespace eZ\Publish\Core\Persistence\Doctrine\Tests;
8
9
class InsertDoctrineQueryTest extends TestCase
10
{
11
    public function testGenerateInsertQuery()
12
    {
13
        $insertQuery = $this->handler->createInsertQuery();
14
15
        $insertQuery->insertInto('query_test')
16
            ->set('val1', '?')
17
            ->set('val2', 'NULL');
18
19
        $this->assertEquals(
20
            'INSERT INTO query_test (val1, val2) VALUES (?, NULL)',
21
            $insertQuery->getQuery()
22
        );
23
    }
24
}
25