private ShopConfigurator
$shopConfigurator;
/**
* @var Connection&MockObject
*/
private Connection
$connection;
protected function setUp(): void
{ $this->connection =
$this->
createMock(Connection::
class);
$this->shopConfigurator =
new ShopConfigurator($this->connection
);
} public function testUpdateBasicInformation(): void
{ $this->connection->
expects(static::
exactly(2
))->
method('executeStatement'
)->
willReturnCallback(function Dstring
$sql, array
$parameters): void
{ static::
assertEquals( trim($sql),
'INSERT INTO `system_config` (`id`, `configuration_key`, `configuration_value`, `sales_channel_id`, `created_at`)
VALUES (:id, :key, :value, NULL, NOW())
ON DUPLICATE KEY UPDATE
`configuration_value` = :value,
`updated_at` = NOW()'