1 | <?php |
||||
2 | |||||
3 | namespace TheCodingMachine\TDBM\Utils; |
||||
4 | |||||
5 | use Doctrine\DBAL\Schema\ForeignKeyConstraint; |
||||
6 | use Doctrine\DBAL\Schema\Table; |
||||
7 | use PHPUnit\Framework\TestCase; |
||||
8 | use TheCodingMachine\TDBM\Utils\Annotation\AnnotationParser; |
||||
9 | |||||
10 | class PivotTableMethodsDescriptorTest extends TestCase |
||||
11 | { |
||||
12 | public function testGetters(): void |
||||
13 | { |
||||
14 | $table = $this->createMock(Table::class); |
||||
15 | $localFk = new ForeignKeyConstraint(['foo'], new Table('table1'), ['lol']); |
||||
16 | $localFk->setLocalTable(new Table('table3')); |
||||
0 ignored issues
–
show
|
|||||
17 | $remoteFk = new ForeignKeyConstraint(['foo2'], new Table('table2'), ['lol2']); |
||||
18 | $remoteFk->setLocalTable(new Table('table3')); |
||||
0 ignored issues
–
show
The function
Doctrine\DBAL\Schema\For...traint::setLocalTable() has been deprecated: Use the table that contains the foreign key as part of its {@see Table::$_fkConstraints} instead.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead. ![]() |
|||||
19 | $ns = $this->createMock(DefaultNamingStrategy::class); |
||||
20 | $descriptor = new PivotTableMethodsDescriptor($table, $localFk, $remoteFk, $ns, AnnotationParser::buildWithDefaultAnnotations([]), 'Bean\Namespace', 'ResultIterator\Namespace'); |
||||
21 | |||||
22 | $this->assertSame($table, $descriptor->getPivotTable()); |
||||
23 | $this->assertSame($localFk, $descriptor->getLocalFk()); |
||||
24 | $this->assertSame($remoteFk, $descriptor->getRemoteFk()); |
||||
25 | } |
||||
26 | } |
||||
27 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.