Programming Language PHP
Namespace Oro\Component\Layout\Model
Class LayoutUpdateImport
Total Examples 2
2 code examples of PHP Oro\Component\Layout\Model\LayoutUpdateImport extracted from open source projects
public function testCreateFromArrayException()
{
$this->expectException(\Oro\Component\Layout\Exception\LogicException::class);
$this->expectExceptionMessage('Import id should be provided, array with "root, namespace" keys given');
LayoutUpdateImport::createFromArray([
ImportsAwareLayoutUpdateInterface::ROOT_KEY => 'root_block_id',
ImportsAwareLayoutUpdateInterface::NAMESPACE_KEY => 'namespace',
]);
}
/**
* @param string|array $importProperties
*/
private function createImport($importProperties): LayoutUpdateImport
{
if (!is_array($importProperties)) {
$importProperties = [ImportsAwareLayoutUpdateInterface::ID_KEY => $importProperties];
}
return LayoutUpdateImport::createFromArray($importProperties);
}