Skip to content

Commit 344a569

Browse files
committed
ACP2E-3490: Product Content Type in Page Builder Gets Collapsed Without Correct Messages
1 parent 6b9635d commit 344a569

File tree

1 file changed

+0
-53
lines changed

1 file changed

+0
-53
lines changed

app/code/Magento/CatalogWidget/Test/Unit/Block/Product/ProductsListTest.php

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ protected function setUp(): void
143143
$this->layout = $arguments['context']->getLayout();
144144
$this->priceCurrency = $this->getMockForAbstractClass(PriceCurrencyInterface::class);
145145

146-
//$arguments['context'] = $this->viewContext;
147146
$this->productsList = $objectManagerHelper->getObject(
148147
ProductsList::class,
149148
$arguments
@@ -454,56 +453,4 @@ public function testScope()
454453
{
455454
$this->assertFalse($this->productsList->isScopePrivate());
456455
}
457-
458-
public function testTrimHtml()
459-
{
460-
$this->productsList->setData('conditions', []);
461-
462-
$collection = $this->getCollection();
463-
$this->getConditionsForCollection($collection);
464-
$this->productsList->setData('html', ' ');
465-
466-
$this->assertEquals('', $this->productsList->toHtml());
467-
}
468-
469-
/**
470-
* @return MockObject
471-
*/
472-
private function getCollection() : MockObject
473-
{
474-
$this->visibility->expects($this->once())->method('getVisibleInCatalogIds')
475-
->willReturn([Visibility::VISIBILITY_IN_CATALOG, Visibility::VISIBILITY_BOTH]);
476-
$collection = $this->getMockBuilder(Collection::class)
477-
->onlyMethods([
478-
'setVisibility',
479-
'addMinimalPrice',
480-
'addFinalPrice',
481-
'addTaxPercents',
482-
'addAttributeToSelect',
483-
'addUrlRewrite',
484-
'addStoreFilter',
485-
'addAttributeToSort',
486-
'setPageSize',
487-
'setCurPage',
488-
'distinct'
489-
])->disableOriginalConstructor()
490-
->getMock();
491-
$collection->expects($this->once())->method('setVisibility')
492-
->with([Visibility::VISIBILITY_IN_CATALOG, Visibility::VISIBILITY_BOTH])
493-
->willReturnSelf();
494-
$collection->expects($this->once())->method('addMinimalPrice')->willReturnSelf();
495-
$collection->expects($this->once())->method('addFinalPrice')->willReturnSelf();
496-
$collection->expects($this->once())->method('addTaxPercents')->willReturnSelf();
497-
$collection->expects($this->once())->method('addAttributeToSelect')->willReturnSelf();
498-
$collection->expects($this->once())->method('addUrlRewrite')->willReturnSelf();
499-
$collection->expects($this->once())->method('addStoreFilter')->willReturnSelf();
500-
$collection->expects($this->once())->method('addAttributeToSort')->willReturnSelf();
501-
$collection->expects($this->once())->method('setPageSize')->willReturnSelf();
502-
$collection->expects($this->once())->method('setCurPage')->willReturnSelf();
503-
$collection->expects($this->once())->method('distinct')->willReturnSelf();
504-
505-
$this->collectionFactory->expects($this->once())->method('create')->willReturn($collection);
506-
507-
return $collection;
508-
}
509456
}

0 commit comments

Comments
 (0)