![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/module-ui/Test/Unit/Component/Form/Element/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ declare(strict_types=1); namespace Magento\Ui\Test\Unit\Component\Form\Element; use Magento\Framework\View\Element\UiComponent\Processor; use Magento\Ui\Component\Form\Element\MultiSelect; /** * @method MultiSelect getModel */ class MultiSelectTest extends AbstractElementTest { /** * @inheritdoc */ protected function getModelName() { return MultiSelect::class; } /** * @inheritdoc */ public function testGetComponentName() { $this->contextMock->expects($this->never())->method('getProcessor'); $this->assertSame(MultiSelect::NAME, $this->getModel()->getComponentName()); } public function testPrepare() { $processorMock = $this->getMockBuilder(Processor::class) ->disableOriginalConstructor() ->setMethods(['register', 'notify']) ->getMock(); $this->contextMock->expects($this->atLeastOnce())->method('getProcessor')->willReturn($processorMock); $this->getModel()->prepare(); $this->assertNotEmpty($this->getModel()->getData()); } }