Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 4b518f0

Browse files
committed
Merge branch 'MAGETWO-84100' of github.com:magento-trigger/magento2ce into MAGETWO-84100
2 parents 47d4523 + ebf5146 commit 4b518f0

File tree

6 files changed

+33
-36
lines changed

6 files changed

+33
-36
lines changed

dev/tests/setup-integration/etc/install-config-mysql.php.dist

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
return [
88
'default' => [
9-
'db-host' => '{{db_host}}',
10-
'db-user' => '{{db_user}}',
11-
'db-password' => '{{db_password}}',
12-
'db-name' => '{{db_name}}',
9+
'db-host' => '{{db-host}}',
10+
'db-user' => '{{db-user}}',
11+
'db-password' => '{{db-password}}',
12+
'db-name' => '{{db-name}}',
1313
'db-prefix' => '',
1414
'backend-frontname' => 'admin',
1515
'admin-user' => 'admin',
@@ -21,15 +21,15 @@ return [
2121
'disable_modules' => 'all'
2222
],
2323
'checkout' => [
24-
'host' => '{{db_host}}',
25-
'username' => '{{db_user}}',
26-
'password' => '{{db_password}}',
27-
'dbname' => '{{db_checkout}}'
24+
'host' => '{{db-host}}',
25+
'username' => '{{db-user}}',
26+
'password' => '{{db-password}}',
27+
'dbname' => '{{db-checkout}}'
2828
],
2929
'sales' => [
30-
'host' => '{{db_host}}',
31-
'username' => '{{db_user}}',
32-
'password' => '{{db_password}}',
33-
'dbname' => '{{db_sales}}'
30+
'host' => '{{db-host}}',
31+
'username' => '{{db-user}}',
32+
'password' => '{{db-password}}',
33+
'dbname' => '{{db-sales}}'
3434
]
3535
];

dev/tests/setup-integration/testsuite/Magento/Setup/DeclarativeInstallerTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ public function testInstallation()
7878
);
7979

8080
//Second time installation should not find anything as we do not change anything
81-
$this->assertNull($diff->getAll());
81+
self::assertNull($diff->getAll());
8282
$shardData = $this->describeTable->describeShard(Sharding::DEFAULT_CONNECTION);
83-
$this->assertEquals($this->getData(), $shardData);
83+
self::assertEquals($this->getData(), $shardData);
8484
}
8585

8686
/**
@@ -155,9 +155,9 @@ public function testInstallationWithColumnsRemoval()
155155
$this->schemaConfig->getDeclarationConfig(),
156156
$this->schemaConfig->getDbConfig()
157157
);
158-
$this->assertNull($diff->getAll());
158+
self::assertNull($diff->getAll());
159159
$shardData = $this->describeTable->describeShard(Sharding::DEFAULT_CONNECTION);
160-
$this->assertEquals($this->getData(), $shardData);
160+
self::assertEquals($this->getData(), $shardData);
161161
}
162162

163163
/**
@@ -192,9 +192,9 @@ public function testInstallationWithConstraintsModification()
192192
$this->schemaConfig->getDeclarationConfig(),
193193
$this->schemaConfig->getDbConfig()
194194
);
195-
$this->assertNull($diff->getAll());
195+
self::assertNull($diff->getAll());
196196
$shardData = $this->describeTable->describeShard(Sharding::DEFAULT_CONNECTION);
197-
$this->assertEquals($this->getTrimmedData(), $shardData);
197+
self::assertEquals($this->getTrimmedData(), $shardData);
198198
}
199199

200200
/**
@@ -221,8 +221,8 @@ public function testInstallationWithDroppingTables()
221221
$this->schemaConfig->getDeclarationConfig(),
222222
$this->schemaConfig->getDbConfig()
223223
);
224-
$this->assertNull($diff->getAll());
224+
self::assertNull($diff->getAll());
225225
$shardData = $this->describeTable->describeShard(Sharding::DEFAULT_CONNECTION);
226-
$this->assertEquals($this->getData(), $shardData);
226+
self::assertEquals($this->getData(), $shardData);
227227
}
228228
}

dev/tests/setup-integration/testsuite/Magento/Setup/DeclarativeSchemaBuilderTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,31 +55,31 @@ public function testSchemaBuilder()
5555
);
5656
$dbSchema = $this->schemaConfig->getDeclarationConfig();
5757
$schemaTables = $dbSchema->getTables();
58-
$this->assertArrayHasKey('reference_table', $dbSchema->getTables());
59-
$this->assertArrayHasKey('test_table', $dbSchema->getTables());
58+
self::assertArrayHasKey('reference_table', $dbSchema->getTables());
59+
self::assertArrayHasKey('test_table', $dbSchema->getTables());
6060
//Test primary key and renaming
6161
$referenceTable = $schemaTables['reference_table'];
6262
/**
6363
* @var Internal $primaryKey
6464
*/
6565
$primaryKey = $referenceTable->getPrimaryConstraint();
6666
$columns = $primaryKey->getColumns();
67-
$this->assertEquals('tinyint_ref', reset($columns)->getName());
67+
self::assertEquals('tinyint_ref', reset($columns)->getName());
6868
//Test column
6969
$testTable = $schemaTables['test_table'];
7070
/**
7171
* @var Timestamp $timestampColumn
7272
*/
7373
$timestampColumn = $testTable->getColumnByName('timestamp');
74-
$this->assertEquals('CURRENT_TIMESTAMP', $timestampColumn->getOnUpdate());
74+
self::assertEquals('CURRENT_TIMESTAMP', $timestampColumn->getOnUpdate());
7575
//Test disabled
76-
$this->assertArrayNotHasKey('varbinary_rename', $testTable->getColumns());
76+
self::assertArrayNotHasKey('varbinary_rename', $testTable->getColumns());
7777
//Test foreign key
7878
/**
7979
* @var Reference $foreignKey
8080
*/
8181
$foreignKey = $testTable->getConstraintByName('some_foreign_key');
82-
$this->assertEquals('NO ACTION', $foreignKey->getOnDelete());
83-
$this->assertEquals('tinyint_ref', $foreignKey->getReferenceColumn()->getName());
82+
self::assertEquals('NO ACTION', $foreignKey->getOnDelete());
83+
self::assertEquals('tinyint_ref', $foreignKey->getReferenceColumn()->getName());
8484
}
8585
}

dev/tests/setup-integration/testsuite/Magento/Setup/DiffOldSchemaTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ public function testOldDiff()
8585
$generatedSchema = $this->schemaConfig->getDbConfig();
8686
$diff = $this->schemaDiff->diff($declarativeSchema, $generatedSchema);
8787
$allChanges = $diff->getAll();
88-
$this->assertCount(1, $allChanges);
89-
$this->assertEquals(
88+
self::assertCount(1, $allChanges);
89+
self::assertEquals(
9090
$this->getBigIntKeyXmlSensitiveData(),
9191
reset($allChanges)['modify_column'][0]->getNew()->getDiffSensitiveParams()
9292
);
93-
$this->assertEquals(
93+
self::assertEquals(
9494
$this->getBigIntKeyDbSensitiveData(),
9595
reset($allChanges)['modify_column'][0]->getOld()->getDiffSensitiveParams()
9696
);

dev/tests/setup-integration/testsuite/Magento/Setup/SchemaReaderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function setUp()
4040
public function testSuccessfullRead()
4141
{
4242
$schema = $this->reader->read('all');
43-
$this->assertEquals($this->getData(), $schema);
43+
self::assertEquals($this->getData(), $schema);
4444
}
4545

4646
/**
@@ -78,6 +78,6 @@ public function testForeignKeyInterpreter()
7878
{
7979
$this->updateRevisionTo('foreign_key_interpreter');
8080
$schema = $this->reader->read('all');
81-
$this->assertEquals($this->getData(), $schema);
81+
self::assertEquals($this->getData(), $schema);
8282
}
8383
}

setup/src/Magento/Setup/Model/Declaration/Schema/Diff/SchemaDiff.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,7 @@ public function diff(
7171
Schema $generatedSchema
7272
) {
7373
$generatedTables = $generatedSchema->getTables();
74-
$tableIndex = array_replace(
75-
array_flip(array_keys($schema->getTables())),
76-
array_flip(array_keys($generatedSchema->getTables()))
77-
);
74+
$tableIndex = array_flip(array_keys($schema->getTables()));
7875
$diff = $this->diffFactory->create(
7976
[
8077
'tableIndexes' => $tableIndex,

0 commit comments

Comments
 (0)