9 use \Magento\Framework\Interception\Code\InterfaceValidator;
10 use \Magento\Framework\Interception\Test\Unit\Custom\Module\Model\InterfaceValidator\ItemPlugin\ValidPlugin;
11 use \Magento\Framework\Interception\Test\Unit\Custom\Module\Model\InterfaceValidator\ItemPlugin\IncompatibleInterface;
12 use \Magento\Framework\Interception\Test\Unit\Custom\Module\Model\InterfaceValidator\ItemPlugin\IncorrectSubject;
13 use \Magento\Framework\Interception\Test\Unit\Custom\Module\Model\InterfaceValidator\ItemPlugin\ExtraParameters;
14 use \Magento\Framework\Interception\Test\Unit\Custom\Module\Model\InterfaceValidator\ItemPlugin\InvalidProceed;
30 $this->argumentsReaderMock = $this->createMock(\
Magento\Framework\Code\Reader\ArgumentsReader::class);
32 $this->argumentsReaderMock->expects($this->any())->method(
'isCompatibleType')
33 ->will($this->returnCallback(
function ($arg1, $arg2) {
34 return ltrim($arg1,
'\\') == ltrim($arg2,
'\\');
50 $this->model->validate(
63 $this->model->validate(
64 IncompatibleInterface::class,
76 $this->model->validate(
77 IncorrectSubject::class,
90 $this->model->validate(
91 \
Magento\Framework\Interception\Test\Unit\Custom\Module\Model::class .
92 '\InterfaceValidator\ItemPlugin\IncompatibleArgumentsCount',
105 $this->model->validate(
106 \
Magento\Framework\Interception\Test\Unit\Custom\Module\Model::class .
107 '\InterfaceValidator\ItemPlugin\IncompatibleArgumentsType',
119 $this->model->validate(
120 ExtraParameters::class,
132 $this->model->validate(
133 InvalidProceed::class,
testValidateIncompatibleMethodArgumentsCount()
testValidateIncorrectSubjectType()
testValidateIncompatibleMethodArgumentsType()
testValidateInvalidProceed()
testValidateIncorrectInterface()
testValidateExtraParameters()