@@ -42,30 +42,18 @@ protected function setUp(): void
42
42
43
43
public function testGetIncomingForeignKeys (): void
44
44
{
45
- /*$schemaAnalyzer = new SchemaAnalyzer(self::getConnection()->getSchemaManager(), new ArrayCache(), 'prefix_');
46
- $cache = new ArrayCache();
47
- $tdbmSchemaAnalyzer = new TDBMSchemaAnalyzer(self::getConnection(), $cache, $schemaAnalyzer, Configuration::getDefaultLockFilePath());*/
48
-
49
45
$ fks = $ this ->tdbmSchemaAnalyzer ->getIncomingForeignKeys ('users ' );
50
46
$ this ->assertCount (1 , $ fks );
51
47
}
52
48
53
49
public function testGetIncomingForeignKeys2 (): void
54
50
{
55
- /*$schemaAnalyzer = new SchemaAnalyzer(self::getConnection()->getSchemaManager(), new ArrayCache(), 'prefix_');
56
- $cache = new ArrayCache();
57
- $tdbmSchemaAnalyzer = new TDBMSchemaAnalyzer(self::getConnection(), $cache, $schemaAnalyzer, Configuration::getDefaultLockFilePath());*/
58
-
59
51
$ fks = $ this ->tdbmSchemaAnalyzer ->getIncomingForeignKeys ('contact ' );
60
52
$ this ->assertCount (1 , $ fks );
61
53
}
62
54
63
55
public function testGetIncomingForeignKeys3 (): void
64
56
{
65
- /*$schemaAnalyzer = new SchemaAnalyzer(self::getConnection()->getSchemaManager(), new ArrayCache(), 'prefix_');
66
- $cache = new ArrayCache();
67
- $tdbmSchemaAnalyzer = new TDBMSchemaAnalyzer(self::getConnection(), $cache, $schemaAnalyzer, Configuration::getDefaultLockFilePath());*/
68
-
69
57
$ fks = $ this ->tdbmSchemaAnalyzer ->getIncomingForeignKeys ('country ' );
70
58
$ this ->assertCount (5 , $ fks );
71
59
$ tables = [$ fks [0 ]->getLocalTableName (), $ fks [1 ]->getLocalTableName (), $ fks [2 ]->getLocalTableName (), $ fks [3 ]->getLocalTableName (), $ fks [4 ]->getLocalTableName ()];
@@ -77,10 +65,6 @@ public function testGetIncomingForeignKeys3(): void
77
65
78
66
public function testGetPivotTableLinkedToTable (): void
79
67
{
80
- /*$schemaAnalyzer = new SchemaAnalyzer(self::getConnection()->getSchemaManager(), new ArrayCache(), 'prefix_');
81
- $cache = new ArrayCache();
82
- $tdbmSchemaAnalyzer = new TDBMSchemaAnalyzer(self::getConnection(), $cache, $schemaAnalyzer, Configuration::getDefaultLockFilePath());*/
83
-
84
68
$ pivotTables = $ this ->tdbmSchemaAnalyzer ->getPivotTableLinkedToTable ('rights ' );
85
69
$ this ->assertCount (1 , $ pivotTables );
86
70
$ this ->assertEquals ('roles_rights ' , $ pivotTables [0 ]);
@@ -91,18 +75,4 @@ public function testGetPivotTableLinkedToTable(): void
91
75
$ pivotTables = $ this ->tdbmSchemaAnalyzer ->getPivotTableLinkedToTable ('animal ' );
92
76
$ this ->assertCount (0 , $ pivotTables );
93
77
}
94
-
95
- /*public function testGetCompulsoryColumnsWithNoInheritance() {
96
- $table = $this->tdbmSchemaAnalyzer->getSchema()->getTable('country');
97
- $compulsoryColumns = $this->tdbmSchemaAnalyzer->getCompulsoryProperties($table);
98
- $this->assertCount(1, $compulsoryColumns);
99
- $this->assertArrayHasKey("label", $compulsoryColumns);
100
- }
101
-
102
- public function testGetCompulsoryColumnsWithInheritance() {
103
- $table = $this->tdbmSchemaAnalyzer->getSchema()->getTable('users');
104
- $compulsoryColumns = $this->tdbmSchemaAnalyzer->getCompulsoryProperties($table);
105
- $this->assertCount(5, $compulsoryColumns);
106
- $this->assertEquals(['name', 'created_at', 'email', 'country_id', 'login'], array_keys($compulsoryColumns));
107
- }*/
108
78
}
0 commit comments