Skip to content

Commit 8fd69d1

Browse files
author
Mike Weis
committed
MAGETWO-54117: L3 Test Fails on Clean 2.0
- revert BlockInstantiationTest.php to its original self
1 parent b71d4e1 commit 8fd69d1

File tree

1 file changed

+0
-209
lines changed

1 file changed

+0
-209
lines changed

dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php

Lines changed: 0 additions & 209 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,9 @@ class BlockInstantiationTest extends \Magento\TestFramework\TestCase\AbstractInt
1717
{
1818
public function testBlockInstantiation()
1919
{
20-
$this->ech("++++ starting test 2.0-MIKE testBlockInstantiation()");
21-
22-
// TODO: used for extreme debugging
23-
if (false) {
24-
$this->ech("++++ bypassing entire test!");
25-
return;
26-
}
27-
2820
$invoker = new \Magento\Framework\App\Utility\AggregateInvoker($this);
2921
$invoker(
3022
function ($module, $class, $area) {
31-
$this->ech("Module: " . $module . ", Class: " . $class . ", Area: " . $area);
3223
$this->assertNotEmpty($module);
3324
$this->assertTrue(class_exists($class), "Block class: {$class}");
3425
\Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
@@ -50,21 +41,13 @@ function ($module, $class, $area) {
5041
try {
5142
\Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create($class);
5243
} catch (\Exception $e) {
53-
$this->ech("Unable to instantiate class: " . $class);
5444
throw new \Exception("Unable to instantiate '{$class}'", 0, $e);
5545
}
5646
},
5747
$this->allBlocksDataProvider()
5848
);
5949
}
6050

61-
// TODO: echo out the message
62-
private function ech($msg) {
63-
echo $msg . "\n";
64-
ob_flush();
65-
flush();
66-
}
67-
6851
/**
6952
* @return array
7053
*/
@@ -79,23 +62,11 @@ public function allBlocksDataProvider()
7962
0
8063
);
8164

82-
$ceSkippedModules = $this->getCEModulesToSkip(); // TODO: debug
83-
$eeSkippedModules = $this->getEEModulesToSkip(); // TODO: debug
84-
8565
$enabledModules = $this->_getEnabledModules();
8666
$skipBlocks = $this->_getBlocksToSkip();
8767
$templateBlocks = [];
8868
$blockMods = \Magento\Framework\App\Utility\Classes::collectModuleClasses('Block');
8969
foreach ($blockMods as $blockClass => $module) {
90-
//$this->ech("++>> module: " . $module . ", blockClass: " . $blockClass);
91-
if (in_array($module, $ceSkippedModules)) {
92-
$this->ech("++++>> skipping ~CE~ module: " . $module);
93-
continue;
94-
}
95-
if (in_array($module, $eeSkippedModules)) {
96-
$this->ech("++++>> skipping +EE+ module: " . $module);
97-
continue;
98-
}
9970
if (!isset($enabledModules[$module]) || isset($skipBlocks[$blockClass])) {
10071
continue;
10172
}
@@ -107,7 +78,6 @@ public function allBlocksDataProvider()
10778
}
10879
return $templateBlocks;
10980
} catch (\Exception $e) {
110-
$this->ech("Corrupted data provider. Last know block: " . $blockClass);
11181
trigger_error(
11282
"Corrupted data provider. Last known block instantiation attempt: '{$blockClass}'." .
11383
" Exception: {$e}",
@@ -116,185 +86,6 @@ public function allBlocksDataProvider()
11686
}
11787
}
11888

119-
/**
120-
* TODO: debug CE contribution to EE build break
121-
*
122-
* @return array
123-
*/
124-
protected function getCEModulesToSkip()
125-
{
126-
$result = [];
127-
// $result[] = "Magento_AdminNotification";
128-
// $result[] = "Magento_AdvancedPricingImportExport";
129-
// $result[] = "Magento_Authorization";
130-
// $result[] = "Magento_Authorizenet";
131-
// $result[] = "Magento_Backend";
132-
// $result[] = "Magento_Backup";
133-
// $result[] = "Magento_Braintree";
134-
// $result[] = "Magento_Bundle";
135-
// $result[] = "Magento_BundleImportExport";
136-
// $result[] = "Magento_CacheInvalidate";
137-
// $result[] = "Magento_Captcha";
138-
// $result[] = "Magento_Catalog";
139-
// $result[] = "Magento_CatalogImportExport";
140-
// $result[] = "Magento_CatalogInventory";
141-
// $result[] = "Magento_CatalogRule";
142-
// $result[] = "Magento_CatalogRuleConfigurable";
143-
// $result[] = "Magento_CatalogSearch";
144-
// $result[] = "Magento_CatalogUrlRewrite";
145-
// $result[] = "Magento_CatalogWidget";
146-
// $result[] = "Magento_Checkout";
147-
// $result[] = "Magento_CheckoutAgreements";
148-
// $result[] = "Magento_Cms";
149-
// $result[] = "Magento_CmsUrlRewrite";
150-
// $result[] = "Magento_Config";
151-
// $result[] = "Magento_ConfigurableImportExport";
152-
// $result[] = "Magento_ConfigurableProduct";
153-
// $result[] = "Magento_Contact";
154-
// $result[] = "Magento_Cookie";
155-
// $result[] = "Magento_Cron";
156-
// $result[] = "Magento_CurrencySymbol";
157-
// $result[] = "Magento_Customer";
158-
// $result[] = "Magento_CustomerImportExport";
159-
// $result[] = "Magento_Deploy";
160-
// $result[] = "Magento_Developer";
161-
// $result[] = "Magento_Dhl";
162-
// $result[] = "Magento_Directory";
163-
// $result[] = "Magento_Downloadable";
164-
// $result[] = "Magento_DownloadableImportExport";
165-
// $result[] = "Magento_Eav";
166-
// $result[] = "Magento_Email";
167-
// $result[] = "Magento_EncryptionKey";
168-
// $result[] = "Magento_Fedex";
169-
// $result[] = "Magento_GiftMessage";
170-
// $result[] = "Magento_GoogleAdwords";
171-
// $result[] = "Magento_GoogleAnalytics";
172-
// $result[] = "Magento_GoogleOptimizer";
173-
// $result[] = "Magento_GroupedImportExport";
174-
// $result[] = "Magento_GroupedProduct";
175-
// $result[] = "Magento_ImportExport";
176-
// $result[] = "Magento_Indexer";
177-
// $result[] = "Magento_Integration";
178-
// $result[] = "Magento_LayeredNavigation";
179-
// $result[] = "Magento_Marketplace";
180-
// $result[] = "Magento_MediaStorage";
181-
// $result[] = "Magento_Msrp";
182-
// $result[] = "Magento_Multishipping";
183-
// $result[] = "Magento_NewRelicReporting";
184-
// $result[] = "Magento_Newsletter";
185-
// $result[] = "Magento_OfflinePayments";
186-
// $result[] = "Magento_OfflineShipping";
187-
// $result[] = "Magento_PageCache";
188-
// $result[] = "Magento_Payment";
189-
// $result[] = "Magento_Paypal";
190-
// $result[] = "Magento_Persistent";
191-
192-
// $result[] = "Magento_ProductAlert"; // seems to have some sort of memory leak
193-
194-
// $result[] = "Magento_ProductVideo";
195-
// $result[] = "Magento_Quote";
196-
// $result[] = "Magento_Reports";
197-
// $result[] = "Magento_RequireJs";
198-
// $result[] = "Magento_Review";
199-
// $result[] = "Magento_Rss";
200-
// $result[] = "Magento_Rule";
201-
// $result[] = "Magento_Sales";
202-
// $result[] = "Magento_SalesRule";
203-
// $result[] = "Magento_SalesSequence";
204-
// $result[] = "Magento_SampleData";
205-
// $result[] = "Magento_Search";
206-
// $result[] = "Magento_SendFriend";
207-
// $result[] = "Magento_Shipping";
208-
// $result[] = "Magento_Sitemap";
209-
// $result[] = "Magento_Store";
210-
// $result[] = "Magento_Swagger";
211-
// $result[] = "Magento_Swatches";
212-
// $result[] = "Magento_Tax"; // Magento\Tax\Block\Adminhtml\Rule
213-
// $result[] = "Magento_TaxImportExport";
214-
// $result[] = "Magento_TestModule1";
215-
// $result[] = "Magento_TestModule2";
216-
// $result[] = "Magento_TestModule3";
217-
// $result[] = "Magento_TestModule4";
218-
// $result[] = "Magento_TestModule5";
219-
// $result[] = "Magento_TestModuleIntegrationFromConfig";
220-
// $result[] = "Magento_TestModuleJoinDirectives";
221-
// $result[] = "Magento_TestModuleMSC";
222-
// $result[] = "Magento_Theme";
223-
// $result[] = "Magento_Translation";
224-
// $result[] = "Magento_Ui";
225-
// $result[] = "Magento_Ups";
226-
// $result[] = "Magento_UrlRewrite";
227-
// $result[] = "Magento_User";
228-
// $result[] = "Magento_Usps";
229-
// $result[] = "Magento_Variable";
230-
// $result[] = "Magento_Version";
231-
// $result[] = "Magento_Webapi";
232-
// $result[] = "Magento_WebapiSecurity";
233-
// $result[] = "Magento_Weee";
234-
// $result[] = "Magento_Widget";
235-
// $result[] = "Magento_Wishlist";
236-
return $result;
237-
}
238-
239-
/**
240-
* TODO: debug EE build break
241-
*
242-
* @return array
243-
*/
244-
protected function getEEModulesToSkip()
245-
{
246-
$result = [];
247-
// $result[] = "Magento_AdminGws";
248-
// $result[] = "Magento_AdvancedCatalog";
249-
// $result[] = "Magento_AdvancedCheckout";
250-
// $result[] = "Magento_AdvancedSearch";
251-
// $result[] = "Magento_Amqp";
252-
// $result[] = "Magento_Banner";
253-
// $result[] = "Magento_BannerCustomerSegment";
254-
// $result[] = "Magento_CatalogEvent";
255-
// $result[] = "Magento_CatalogPermissions";
256-
// $result[] = "Magento_CustomAttributeManagement";
257-
// $result[] = "Magento_CustomerBalance";
258-
// $result[] = "Magento_CustomerCustomAttributes";
259-
// $result[] = "Magento_CustomerFinance";
260-
// $result[] = "Magento_CustomerSegment";
261-
// $result[] = "Magento_Cybersource";
262-
// $result[] = "Magento_Doc";
263-
// $result[] = "Magento_Enterprise";
264-
// $result[] = "Magento_Eway";
265-
// $result[] = "Magento_GiftCard";
266-
// $result[] = "Magento_GiftCardAccount";
267-
// $result[] = "Magento_GiftCardImportExport";
268-
// $result[] = "Magento_GiftRegistry";
269-
// $result[] = "Magento_GiftWrapping";
270-
// $result[] = "Magento_GoogleTagManager";
271-
// $result[] = "Magento_Invitation";
272-
// $result[] = "Magento_Logging";
273-
// $result[] = "Magento_MessageQueue";
274-
// $result[] = "Magento_MultipleWishlist";
275-
// $result[] = "Magento_MysqlMq";
276-
// $result[] = "Magento_PersistentHistory";
277-
// $result[] = "Magento_PricePermissions";
278-
// $result[] = "Magento_PromotionPermissions";
279-
// $result[] = "Magento_Reminder";
280-
// $result[] = "Magento_ResourceConnections";
281-
// $result[] = "Magento_Reward";
282-
// $result[] = "Magento_Rma";
283-
// $result[] = "Magento_SalesArchive";
284-
// $result[] = "Magento_ScalableCheckout";
285-
// $result[] = "Magento_ScalableInventory";
286-
// $result[] = "Magento_ScalableOms";
287-
// $result[] = "Magento_ScheduledImportExport";
288-
// $result[] = "Magento_Solr";
289-
// $result[] = "Magento_Support";
290-
// $result[] = "Magento_TargetRule";
291-
// $result[] = "Magento_VersionsCms";
292-
// $result[] = "Magento_VisualMerchandiser";
293-
// $result[] = "Magento_WebsiteRestriction";
294-
// $result[] = "Magento_Worldpay";
295-
return $result;
296-
}
297-
29889
/**
29990
* Loads block classes, that should not be instantiated during the instantiation test
30091
*

0 commit comments

Comments
 (0)