Passed
Pull Request — master (#396)
by Wilmer
02:32
created

AbstractCommandTest::testAddCheck()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 10
nc 1
nop 0
dl 0
loc 16
rs 9.9332
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Db\Tests;
6
7
use PHPUnit\Framework\TestCase;
8
use Yiisoft\Cache\Dependency\TagDependency;
9
use Yiisoft\Db\Command\CommandInterface;
10
use Yiisoft\Db\Command\Param;
11
use Yiisoft\Db\Command\ParamInterface;
12
use Yiisoft\Db\Driver\PDO\ConnectionPDOInterface;
13
use Yiisoft\Db\Exception\Exception;
14
use Yiisoft\Db\Exception\InvalidCallException;
15
use Yiisoft\Db\Exception\InvalidConfigException;
16
use Yiisoft\Db\Exception\InvalidParamException;
17
use Yiisoft\Db\Exception\NotSupportedException;
18
use Yiisoft\Db\Expression\Expression;
19
use Yiisoft\Db\Query\Data\DataReader;
20
use Yiisoft\Db\Schema\Schema;
21
use Yiisoft\Db\Schema\SchemaBuilderTrait;
22
use Yiisoft\Db\Tests\Support\Assert;
23
use Yiisoft\Db\Tests\Support\DbHelper;
24
use Yiisoft\Db\Tests\Support\TestTrait;
25
26
abstract class AbstractCommandTest extends TestCase
27
{
28
    use SchemaBuilderTrait;
29
    use TestTrait;
30
31
    protected ConnectionPDOInterface $db;
32
    protected string $upsertTestCharCast = '';
33
34
    public function testAddCheck(): void
35
    {
36
        $db = $this->getConnection();
37
38
        $command = $db->createCommand();
39
        $sql = $command->addCheck('name', 'table', 'id > 0')->getSql();
40
41
42
        $this->assertSame(
43
            DbHelper::replaceQuotes(
44
                <<<SQL
45
                ALTER TABLE [[table]] ADD CONSTRAINT [[name]] CHECK (id > 0)
46
                SQL,
47
                $db->getName(),
48
            ),
49
            $sql,
50
        );
51
    }
52
53
    public function testAddColumn(): void
54
    {
55
        $db = $this->getConnection();
56
57
        $command = $db->createCommand();
58
        $sql = $command->addColumn('table', 'column', Schema::TYPE_INTEGER)->getSql();
59
60
        $this->assertSame(
61
            DbHelper::replaceQuotes(
62
                <<<SQL
63
                ALTER TABLE [[table]] ADD [[column]] integer
64
                SQL,
65
                $db->getName(),
66
            ),
67
            $sql,
68
        );
69
    }
70
71
    public function testAddCommentOnColumn(): void
72
    {
73
        $db = $this->getConnection();
74
75
        $command = $db->createCommand();
76
        $sql = $command->addCommentOnColumn('customer', 'id', 'Primary key.')->getSql();
77
78
        $this->assertStringContainsString(
79
            DbHelper::replaceQuotes(
80
                <<<SQL
81
                COMMENT ON COLUMN [[customer]].[[id]] IS 'Primary key.'
82
                SQL,
83
                $db->getName(),
84
            ),
85
            $sql,
86
        );
87
    }
88
89
    public function testAddCommentOnTable(): void
90
    {
91
        $db = $this->getConnection();
92
93
        $command = $db->createCommand();
94
        $sql = $command->addCommentOnTable('table', 'comment')->getSql();
95
96
        $this->assertSame(
97
            DbHelper::replaceQuotes(
98
                <<<SQL
99
                COMMENT ON TABLE [[table]] IS 'comment'
100
                SQL,
101
                $db->getName(),
102
            ),
103
            $sql,
104
        );
105
    }
106
107
    public function testAddForeignKey(): void
108
    {
109
        $db = $this->getConnection();
110
111
        $command = $db->createCommand();
112
        $sql = $command->addForeignKey('name', 'table', 'column', 'ref_table', 'ref_column')->getSql();
113
114
        $this->assertSame(
115
            DbHelper::replaceQuotes(
116
                <<<SQL
117
                ALTER TABLE [[table]] ADD CONSTRAINT [[name]] FOREIGN KEY ([[column]]) REFERENCES [[ref_table]] ([[ref_column]])
118
                SQL,
119
                $db->getName(),
120
            ),
121
            $sql,
122
        );
123
124
        $sql = $command->addForeignKey('name', 'table', 'column', 'ref_table', 'ref_column', 'CASCADE')->getSql();
125
126
        $this->assertSame(
127
            DbHelper::replaceQuotes(
128
                <<<SQL
129
                ALTER TABLE [[table]] ADD CONSTRAINT [[name]] FOREIGN KEY ([[column]]) REFERENCES [[ref_table]] ([[ref_column]]) ON DELETE CASCADE
130
                SQL,
131
                $db->getName(),
132
            ),
133
            $sql,
134
        );
135
136
        $sql = $command
137
            ->addForeignKey('name', 'table', 'column', 'ref_table', 'ref_column', 'CASCADE', 'CASCADE')
138
            ->getSql();
139
140
        $this->assertSame(
141
            DbHelper::replaceQuotes(
142
                <<<SQL
143
                ALTER TABLE [[table]] ADD CONSTRAINT [[name]] FOREIGN KEY ([[column]]) REFERENCES [[ref_table]] ([[ref_column]]) ON DELETE CASCADE ON UPDATE CASCADE
144
                SQL,
145
                $db->getName(),
146
            ),
147
            $sql,
148
        );
149
    }
150
151
    public function testAddPrimaryKey(): void
152
    {
153
        $db = $this->getConnection();
154
155
        $command = $db->createCommand();
156
        $sql = $command->addPrimaryKey('name', 'table', 'column')->getSql();
157
158
159
        $this->assertSame(
160
            DbHelper::replaceQuotes(
161
                <<<SQL
162
                ALTER TABLE [[table]] ADD CONSTRAINT [[name]] PRIMARY KEY ([[column]])
163
                SQL,
164
                $db->getName(),
165
            ),
166
            $sql,
167
        );
168
169
        $sql = $command->addPrimaryKey('name', 'table', ['column1', 'column2'])->getSql();
170
171
172
        $this->assertSame(
173
            DbHelper::replaceQuotes(
174
                <<<SQL
175
                ALTER TABLE [[table]] ADD CONSTRAINT [[name]] PRIMARY KEY ([[column1]], [[column2]])
176
                SQL,
177
                $db->getName(),
178
            ),
179
            $sql,
180
        );
181
    }
182
183
    public function testAddUnique(): void
184
    {
185
        $db = $this->getConnection();
186
187
        $command = $db->createCommand();
188
        $sql = $command->addUnique('name', 'table', 'column')->getSql();
189
190
        $this->assertSame(
191
            DbHelper::replaceQuotes(
192
                <<<SQL
193
                ALTER TABLE [[table]] ADD CONSTRAINT [[name]] UNIQUE ([[column]])
194
                SQL,
195
                $db->getName(),
196
            ),
197
            $sql,
198
        );
199
200
        $sql = $command->addUnique('name', 'table', ['column1', 'column2'])->getSql();
201
202
        $this->assertSame(
203
            DbHelper::replaceQuotes(
204
                <<<SQL
205
                ALTER TABLE [[table]] ADD CONSTRAINT [[name]] UNIQUE ([[column1]], [[column2]])
206
                SQL,
207
                $db->getName(),
208
            ),
209
            $sql,
210
        );
211
    }
212
213
    public function testAlterColumn(): void
214
    {
215
        $db = $this->getConnection();
216
217
        $command = $db->createCommand();
218
        $sql = $command->alterColumn('table', 'column', Schema::TYPE_INTEGER)->getSql();
219
220
        $this->assertSame(
221
            DbHelper::replaceQuotes(
222
                <<<SQL
223
                ALTER TABLE [[table]] CHANGE [[column]] [[column]] integer
224
                SQL,
225
                $db->getName(),
226
            ),
227
            $sql,
228
        );
229
    }
230
231
    public function testBindValues(): void
232
    {
233
        $db = $this->getConnection();
234
235
        $command = $db->createCommand();
236
237
        $values = ['int' => 1, 'string' => 'str'];
238
        $command->bindValues($values);
239
        $bindedValues = $command->getParams(false);
240
241
        $this->assertIsArray($bindedValues);
242
        $this->assertContainsOnlyInstancesOf(ParamInterface::class, $bindedValues);
243
        $this->assertCount(2, $bindedValues);
244
245
        $param = new Param('str', 99);
246
        $command->bindValues(['param' => $param]);
247
        $bindedValues = $command->getParams(false);
248
249
        $this->assertIsArray($bindedValues);
250
        $this->assertContainsOnlyInstancesOf(ParamInterface::class, $bindedValues);
251
        $this->assertCount(3, $bindedValues);
252
        $this->assertSame($param, $bindedValues['param']);
253
        $this->assertNotEquals($param, $bindedValues['int']);
254
255
        /* Replace test */
256
        $command->bindValues(['int' => $param]);
257
        $bindedValues = $command->getParams(false);
258
259
        $this->assertIsArray($bindedValues);
260
        $this->assertContainsOnlyInstancesOf(ParamInterface::class, $bindedValues);
261
        $this->assertCount(3, $bindedValues);
262
        $this->assertSame($param, $bindedValues['int']);
263
    }
264
265
    public function testCache(): void
266
    {
267
        $db = $this->getConnection();
268
269
        $tagDependency = new TagDependency('tag');
270
        $command = $db->createCommand();
271
        $command->cache(100, $tagDependency);
272
273
        $this->assertInstanceOf(CommandInterface::class, $command);
274
        $this->assertSame(100, Assert::getInaccessibleProperty($command, 'queryCacheDuration'));
275
        $this->assertSame($tagDependency, Assert::getInaccessibleProperty($command, 'queryCacheDependency'));
276
    }
277
278
    public function testConstruct(): void
279
    {
280
        $db = $this->getConnection();
281
282
        $command = $db->createCommand();
283
284
        $this->assertEmpty($command->getSql());
285
286
        $sql = <<<SQL
287
        SELECT * FROM customer WHERE name=:name
288
        SQL;
289
        $command = $db->createCommand($sql, [':name' => 'John']);
290
291
        $this->assertSame($sql, $command->getSql());
292
        $this->assertSame([':name' => 'John'], $command->getParams());
293
    }
294
295
    /**
296
     * @dataProvider \Yiisoft\Db\Tests\Provider\CommandProvider::createIndex()
297
     */
298
    public function testCreateIndex(
299
        string $name,
300
        string $table,
301
        array|string $column,
302
        string $indexType,
303
        string $indexMethod,
304
        string $expected,
305
    ): void {
306
        $db = $this->getConnection();
307
308
        $command = $db->createCommand();
309
310
        $sql = $command->createIndex($name, $table, $column, $indexType, $indexMethod)->getSql();
311
312
        $this->assertSame($expected, $sql);
313
    }
314
315
    public function testCreateView(): void
316
    {
317
        $db = $this->getConnection();
318
319
        $command = $db->createCommand();
320
321
        $sql = $command->createView(
322
            'view',
323
            <<<SQL
324
            SELECT * FROM table
325
            SQL,
326
        )->getSql();
327
328
        $this->assertSame(
329
            DbHelper::replaceQuotes(
330
                <<<SQL
331
                CREATE VIEW [[view]] AS SELECT * FROM table
332
                SQL,
333
                $db->getName(),
334
            ),
335
            $sql,
336
        );
337
    }
338
339
    public function testDataReaderCreationException(): void
340
    {
341
        $db = $this->getConnection();
342
343
        $this->expectException(InvalidParamException::class);
344
        $this->expectExceptionMessage('The PDOStatement cannot be null.');
345
346
        $sql = 'SELECT * FROM {{customer}}';
347
        new DataReader($db->createCommand($sql));
348
    }
349
350
    public function testDelete(): void
351
    {
352
        $db = $this->getConnection();
353
354
        $command = $db->createCommand();
355
        $sql = $command->delete('table', ['column' => 'value'])->getSql();
356
357
        $this->assertSame(
358
            DbHelper::replaceQuotes(
359
                <<<SQL
360
                DELETE FROM [[table]] WHERE [[column]]=:qp0
361
                SQL,
362
                $db->getName(),
363
            ),
364
            $sql,
365
        );
366
    }
367
368
    public function testDropCheck(): void
369
    {
370
        $db = $this->getConnection();
371
372
        $command = $db->createCommand();
373
        $sql = $command->dropCheck('name', 'table')->getSql();
374
375
        $this->assertSame(
376
            DbHelper::replaceQuotes(
377
                <<<SQL
378
                ALTER TABLE [[table]] DROP CONSTRAINT [[name]]
379
                SQL,
380
                $db->getName(),
381
            ),
382
            $sql,
383
        );
384
    }
385
386
    public function testDropColumn(): void
387
    {
388
        $db = $this->getConnection();
389
390
        $command = $db->createCommand();
391
        $sql = $command->dropColumn('table', 'column')->getSql();
392
393
        $this->assertSame(
394
            DbHelper::replaceQuotes(
395
                <<<SQL
396
                ALTER TABLE [[table]] DROP COLUMN [[column]]
397
                SQL,
398
                $db->getName(),
399
            ),
400
            $sql,
401
        );
402
    }
403
404
    public function testDropCommentFromColumn(): void
405
    {
406
        $db = $this->getConnection();
407
408
        $command = $db->createCommand();
409
        $sql = $command->dropCommentFromColumn('table', 'column')->getSql();
410
411
        $this->assertSame(
412
            DbHelper::replaceQuotes(
413
                <<<SQL
414
                COMMENT ON COLUMN [[table]].[[column]] IS NULL
415
                SQL,
416
                $db->getName(),
417
            ),
418
            $sql,
419
        );
420
    }
421
422
    public function testDropCommentFromTable(): void
423
    {
424
        $db = $this->getConnection();
425
426
        $command = $db->createCommand();
427
        $sql = $command->dropCommentFromTable('table')->getSql();
428
429
        $this->assertSame(
430
            DbHelper::replaceQuotes(
431
                <<<SQL
432
                COMMENT ON TABLE [[table]] IS NULL
433
                SQL,
434
                $db->getName(),
435
            ),
436
            $sql,
437
        );
438
    }
439
440
    public function testDropForeingKey(): void
441
    {
442
        $db = $this->getConnection();
443
444
        $command = $db->createCommand();
445
        $sql = $command->dropForeignKey('name', 'table')->getSql();
446
447
        $this->assertSame(
448
            DbHelper::replaceQuotes(
449
                <<<SQL
450
                ALTER TABLE [[table]] DROP CONSTRAINT [[name]]
451
                SQL,
452
                $db->getName(),
453
            ),
454
            $sql,
455
        );
456
    }
457
458
    public function testDropIndex(): void
459
    {
460
        $db = $this->getConnection();
461
462
        $command = $db->createCommand();
463
        $sql = $command->dropIndex('name', 'table')->getSql();
464
465
        $this->assertSame(
466
            DbHelper::replaceQuotes(
467
                <<<SQL
468
                DROP INDEX [[name]] ON [[table]]
469
                SQL,
470
                $db->getName(),
471
            ),
472
            $sql,
473
        );
474
    }
475
476
    public function testDropPrimaryKey(): void
477
    {
478
        $db = $this->getConnection();
479
480
        $command = $db->createCommand();
481
        $sql = $command->dropPrimaryKey('name', 'table')->getSql();
482
483
        $this->assertSame(
484
            DbHelper::replaceQuotes(
485
                <<<SQL
486
                ALTER TABLE [[table]] DROP CONSTRAINT [[name]]
487
                SQL,
488
                $db->getName(),
489
            ),
490
            $sql,
491
        );
492
    }
493
494
    public function testDropTable(): void
495
    {
496
        $db = $this->getConnection();
497
498
        $command = $db->createCommand();
499
        $sql = $command->dropTable('table')->getSql();
500
501
        $this->assertSame(
502
            DbHelper::replaceQuotes(
503
                <<<SQL
504
                DROP TABLE [[table]]
505
                SQL,
506
                $db->getName(),
507
            ),
508
            $sql,
509
        );
510
    }
511
512
    public function testDropView(): void
513
    {
514
        $db = $this->getConnection();
515
516
        $command = $db->createCommand();
517
        $sql = $command->dropView('view')->getSql();
518
519
        $this->assertSame(
520
            DbHelper::replaceQuotes(
521
                <<<SQL
522
                DROP VIEW [[view]]
523
                SQL,
524
                $db->getName(),
525
            ),
526
            $sql,
527
        );
528
    }
529
530
    public function testDropUnique(): void
531
    {
532
        $db = $this->getConnection();
533
534
        $command = $db->createCommand();
535
        $sql = $command->dropUnique('name', 'table')->getSql();
536
537
        $this->assertSame(
538
            DbHelper::replaceQuotes(
539
                <<<SQL
540
                ALTER TABLE [[table]] DROP CONSTRAINT [[name]]
541
                SQL,
542
                $db->getName(),
543
            ),
544
            $sql,
545
        );
546
    }
547
548
    public function testExecuteWithSqlEmtpy(): void
549
    {
550
        $db = $this->getConnection();
551
552
        $command = $db->createCommand();
553
554
        $this->assertSame(0, $command->execute());
555
    }
556
557
    public function testGetParams(): void
558
    {
559
        $db = $this->getConnection();
560
561
        $command = $db->createCommand();
562
        $values = [
563
            'int' => 1,
564
            'string' => 'str',
565
        ];
566
        $command->bindValues($values);
567
        $bindedValues = $command->getParams(false);
568
569
        $this->assertIsArray($bindedValues);
570
        $this->assertContainsOnlyInstancesOf(ParamInterface::class, $bindedValues);
571
        $this->assertCount(2, $bindedValues);
572
573
        $param = new Param('str', 99);
574
        $command->bindValues(['param' => $param]);
575
        $bindedValues = $command->getParams(false);
576
577
        $this->assertIsArray($bindedValues);
578
        $this->assertContainsOnlyInstancesOf(ParamInterface::class, $bindedValues);
579
        $this->assertCount(3, $bindedValues);
580
        $this->assertEquals($param, $bindedValues['param']);
581
        $this->assertNotEquals($param, $bindedValues['int']);
582
583
        /* Replace test */
584
        $command->bindValues(['int' => $param]);
585
        $bindedValues = $command->getParams(false);
586
587
        $this->assertIsArray($bindedValues);
588
        $this->assertContainsOnlyInstancesOf(ParamInterface::class, $bindedValues);
589
        $this->assertCount(3, $bindedValues);
590
        $this->assertEquals($param, $bindedValues['int']);
591
    }
592
593
    /**
594
     * Test command getRawSql.
595
     *
596
     * @dataProvider \Yiisoft\Db\Tests\Provider\CommandProvider::rawSql()
597
     *
598
     * @throws Exception
599
     * @throws InvalidConfigException
600
     * @throws NotSupportedException
601
     *
602
     * {@see https://github.com/yiisoft/yii2/issues/8592}
603
     */
604
    public function testGetRawSql(string $sql, array $params, string $expectedRawSql): void
605
    {
606
        $db = $this->getConnection();
607
608
        $command = $db->createCommand($sql, $params);
609
610
        $this->assertSame($expectedRawSql, $command->getRawSql());
611
    }
612
613
    public function testGetSetSql(): void
614
    {
615
        $db = $this->getConnection();
616
617
        $sql = <<<SQL
618
        SELECT * FROM customer
619
        SQL;
620
        $command = $db->createCommand($sql);
621
        $this->assertSame($sql, $command->getSql());
622
623
        $sql2 = <<<SQL
624
        SELECT * FROM order
625
        SQL;
626
        $command->setSql($sql2);
627
        $this->assertSame($sql2, $command->getSql());
628
    }
629
630
    public function testLastInsertIdException(): void
631
    {
632
        $db = $this->getConnection();
633
634
        $db->close();
635
636
        $this->expectException(InvalidCallException::class);
637
638
        $db->getLastInsertID();
639
    }
640
641
    public function testNoCache(): void
642
    {
643
        $db = $this->getConnection();
644
645
        $command = $db->createCommand()->noCache();
646
647
        $this->assertSame(-1, Assert::getInaccessibleProperty($command, 'queryCacheDuration'));
648
        $this->assertInstanceOf(CommandInterface::class, $command);
649
    }
650
651
    public function testPrepareCancel(): void
652
    {
653
        $db = $this->getConnection();
654
655
        $db->open();
656
        $pdo = $db->getPdo();
657
        $pdo->exec(
658
            <<<SQL
659
            CREATE TABLE customer (id integer PRIMARY KEY)
660
            SQL
661
        );
662
        $command = $db->createCommand();
663
        $command->setSql(
664
            <<<SQL
665
            SELECT * FROM {{customer}}
666
            SQL
667
        );
668
669
        $this->assertNull($command->getPdoStatement());
0 ignored issues
show
Bug introduced by
Are you sure the usage of $command->getPdoStatement() targeting Yiisoft\Db\Driver\PDO\Co...dPDO::getPdoStatement() seems to always return null.

This check looks for function or method calls that always return null and whose return value is used.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
if ($a->getObject()) {

The method getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
670
671
        $command->prepare();
672
673
        $this->assertNotNull($command->getPdoStatement());
674
675
        $command->cancel();
676
677
        $this->assertNull($command->getPdoStatement());
0 ignored issues
show
Bug introduced by
Are you sure the usage of $command->getPdoStatement() targeting Yiisoft\Db\Driver\PDO\Co...dPDO::getPdoStatement() seems to always return null.

This check looks for function or method calls that always return null and whose return value is used.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
if ($a->getObject()) {

The method getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
678
    }
679
680
    public function testRenameColumn(): void
681
    {
682
        $db = $this->getConnection();
683
684
        $sql = $db->createCommand()->renameColumn('table', 'oldname', 'newname')->getSql();
685
686
        $this->assertSame(
687
            DbHelper::replaceQuotes(
688
                <<<SQL
689
                ALTER TABLE [[table]] RENAME COLUMN [[oldname]] TO [[newname]]
690
                SQL,
691
                $db->getName(),
692
            ),
693
            $sql,
694
        );
695
    }
696
697
    public function testSetRawSql(): void
698
    {
699
        $db = $this->getConnection();
700
701
        $command = $db->createCommand();
702
        $command->setRawSql(
703
            <<<SQL
704
            SELECT 123
705
            SQL
706
        );
707
708
        $this->assertSame('SELECT 123', $command->getRawSql());
709
    }
710
711
    public function testSetRetryHandler(): void
712
    {
713
        $db = $this->getConnection();
714
715
        $command = $db->createCommand();
716
717
        $handler = static fn (): bool => true;
718
719
        Assert::invokeMethod($command, 'setRetryHandler', [$handler]);
720
721
        $this->assertSame($handler, Assert::getInaccessibleProperty($command, 'retryHandler'));
722
    }
723
724
    public function testTruncateTable(): void
725
    {
726
        $db = $this->getConnection();
727
728
        $command = $db->createCommand();
729
        $sql = $command->truncateTable('table')->getSql();
730
731
        $this->assertSame(
732
            DbHelper::replaceQuotes(
733
                <<<SQL
734
                TRUNCATE TABLE [[table]]
735
                SQL,
736
                $db->getName(),
737
            ),
738
            $sql,
739
        );
740
    }
741
742
    protected function performAndCompareUpsertResult(ConnectionPDOInterface $db, array $data): void
743
    {
744
        $params = $data['params'];
745
        $expected = $data['expected'] ?? $params[1];
746
747
        $command = $db->createCommand();
748
        call_user_func_array([$command, 'upsert'], $params);
749
        $command->execute();
750
751
        $actual = $this->getQuery($db)
0 ignored issues
show
Bug introduced by
The method getQuery() does not exist on Yiisoft\Db\Tests\AbstractCommandTest. Did you maybe mean getQueryCache()? ( Ignorable by Annotation )

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

751
        $actual = $this->/** @scrutinizer ignore-call */ getQuery($db)

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
752
            ->select(['email', 'address' => new Expression($this->upsertTestCharCast), 'status'])
753
            ->from('T_upsert')
754
            ->one();
755
        $this->assertEquals($expected, $actual, $this->upsertTestCharCast);
756
    }
757
}
758