8 use \Magento\Framework\Module\FullModuleList;
19 $loaderMock = $this->createMock(\
Magento\Framework\Module\
ModuleList\Loader::class);
21 'Vendor_A' => [
'data' =>
'a'],
22 'Vendor_B' => [
'data' =>
'b'],
23 'Vendor_C' => [
'data' =>
'c'],
25 $loaderMock->expects($this->once())->method(
'load')->will($this->returnValue($modules));
32 'Vendor_A' => [
'data' =>
'a'],
33 'Vendor_B' => [
'data' =>
'b'],
34 'Vendor_C' => [
'data' =>
'c'],
36 $this->assertEquals($expect, $this->moduleList->getAll());
38 $this->moduleList->getAll();
43 $expect = [
'data' =>
'b'];
44 $this->assertEquals($expect, $this->moduleList->getOne(
'Vendor_B'));
49 $expect = [
'Vendor_A',
'Vendor_B',
'Vendor_C'];
50 $this->assertEquals($expect, $this->moduleList->getNames());
55 $this->assertTrue($this->moduleList->has(
'Vendor_A'));
60 $this->assertFalse($this->moduleList->has(
'No_Such_Module'));