|
7 | 7 |
|
8 | 8 | namespace Magento\MagentoCloud\Test\Unit\Config\Validator\Deploy;
|
9 | 9 |
|
| 10 | +use Magento\MagentoCloud\App\Error as ApplicationError; |
10 | 11 | use Magento\MagentoCloud\Config\ConfigException;
|
11 | 12 | use Magento\MagentoCloud\Config\Stage\DeployInterface;
|
12 | 13 | use Magento\MagentoCloud\Config\Validator\Deploy\DatabaseSplitConnection;
|
@@ -78,14 +79,19 @@ public function testMessageValidate()
|
78 | 79 | ->willReturn($dbConfiguration);
|
79 | 80 | $this->resultFactoryMock->expects($this->once())
|
80 | 81 | ->method('error')
|
81 |
| - ->with('Split database configuration was detected in the property DATABASE_CONFIGURATION of the' |
82 |
| - . ' file .magento.env.yaml:' . PHP_EOL |
83 |
| - . '- connection: checkout' . PHP_EOL |
84 |
| - . '- connection: sales' . PHP_EOL |
85 |
| - . '- slave_connection: checkout' . PHP_EOL |
86 |
| - . '- slave_connection: sales' . PHP_EOL |
87 |
| - . 'Magento Cloud does not support a custom split database configuration,' |
88 |
| - . ' such configurations will be ignored'); |
| 82 | + ->with( |
| 83 | + 'Detected split database configuration in the DATABASE_CONFIGURATION property of the' |
| 84 | + . ' file .magento.env.yaml:' . PHP_EOL |
| 85 | + . '- connection: checkout' . PHP_EOL |
| 86 | + . '- connection: sales' . PHP_EOL |
| 87 | + . '- slave_connection: checkout' . PHP_EOL |
| 88 | + . '- slave_connection: sales' . PHP_EOL |
| 89 | + . 'Magento Cloud does not support custom connections in the split database configuration,' |
| 90 | + . ' Custom connections will be ignored', |
| 91 | + 'Update the DATABASE_CONFIGURATION variable in the \'.magento.env.yaml\' file to remove ' |
| 92 | + . 'custom connections for split databases.', |
| 93 | + ApplicationError::WARN_WRONG_SPLIT_DB_CONFIG |
| 94 | + ); |
89 | 95 |
|
90 | 96 | $this->assertInstanceOf(Error::class, $this->validator->validate());
|
91 | 97 | }
|
|
0 commit comments