File: PrimaryKeyConstraintTest.php

package info (click to toggle)
php-doctrine-dbal 4.3.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 5,088 kB
  • sloc: php: 60,318; xml: 618; makefile: 23
file content (20 lines) | stat: -rw-r--r-- 525 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

declare(strict_types=1);

namespace Doctrine\DBAL\Tests\Schema;

use Doctrine\DBAL\Schema\Exception\InvalidPrimaryKeyConstraintDefinition;
use Doctrine\DBAL\Schema\PrimaryKeyConstraint;
use PHPUnit\Framework\TestCase;

class PrimaryKeyConstraintTest extends TestCase
{
    public function testEmptyReferencingColumnNames(): void
    {
        $this->expectException(InvalidPrimaryKeyConstraintDefinition::class);

        /** @phpstan-ignore argument.type */
        new PrimaryKeyConstraint(null, [], false);
    }
}