21 $invoker = new \Magento\Framework\App\Utility\AggregateInvoker($this);
23 function ($module,
$class, $area) {
24 $this->assertNotEmpty($module);
37 \
Magento\Customer\Model\GroupManagement::NOT_LOGGED_IN_ID,
38 \
Magento\Customer\Model\GroupManagement::NOT_LOGGED_IN_ID
44 }
catch (\Exception $e) {
45 throw new \Exception(
"Unable to instantiate '{$class}'", 0, $e);
48 $this->allBlocksDataProvider()
55 public function allBlocksDataProvider()
61 \
Magento\Store\Model\StoreManagerInterface::class
62 )->getStore()->setWebsiteId(
66 $enabledModules = $this->_getEnabledModules();
70 foreach ($blockMods as $blockClass => $module) {
71 if (!isset($enabledModules[$module]) || isset($skipBlocks[$blockClass])) {
74 $class = new \ReflectionClass($blockClass);
75 if (
$class->isAbstract() || !
$class->isSubclassOf(\
Magento\Framework\View\Element\Template::class)) {
78 $templateBlocks = $this->_addBlock($module, $blockClass,
$class, $templateBlocks);
80 asort($templateBlocks);
81 return $templateBlocks;
82 }
catch (\Exception $e) {
84 "Corrupted data provider. Last known block instantiation attempt: '{$blockClass}'." .
99 foreach (glob(
__DIR__ .
'/_files/skip_blocks*.php') as $file) {
100 $blocks = include $file;
113 private function _addBlock($module, $blockClass,
$class, $templateBlocks)
116 if ($module ==
'Magento_Backend' || strpos(
119 ) !==
false || strpos(
122 ) !==
false ||
$class->isSubclassOf(
123 \
Magento\Backend\Block\Template::class
135 $templateBlocks[$module .
', ' . $blockClass .
', ' . $area] = [$module, $blockClass, $area];
136 return $templateBlocks;
defined('TESTS_BP')||define('TESTS_BP' __DIR__
$_option $_optionId $class
static collectModuleClasses($subTypePattern='[A-Za-z]+')
static getObjectManager()