Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit fce2a3e

Browse files
author
Dmytro Yushkin
committed
Merge branch 'MAGETWO-66178' into MAGETWO-63642
2 parents 899c9e0 + e01d3f6 commit fce2a3e

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

Block/Adminhtml/CaseInfoTest.php

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function testModuleIsInactive()
5151
{
5252
$this->order->loadByIncrementId('100000001');
5353

54-
static::assertNotEmpty($this->getBlockContents());
54+
static::assertNotEmpty($this->getBlock()->toHtml());
5555
}
5656

5757
/**
@@ -67,14 +67,13 @@ public function testCaseEntityNotExists()
6767
{
6868
$this->order->loadByIncrementId('100000001');
6969

70-
static::assertEmpty($this->getBlockContents());
70+
static::assertEmpty($this->getBlock()->toHtml());
7171
}
7272

7373
/**
7474
* Checks that:
7575
* - block give contents
76-
* - associated team displays correct
77-
* - score class displays correct
76+
* - block contents guarantee decision field
7877
*
7978
* @covers \Magento\Signifyd\Block\Adminhtml\CaseInfo::getScoreClass
8079
* @magentoConfigFixture current_store fraud_protection/signifyd/active 1
@@ -85,18 +84,17 @@ public function testCaseEntityExists()
8584
{
8685
$this->order->loadByIncrementId('100000001');
8786

88-
$html = $this->getBlockContents();
89-
static::assertNotEmpty($html);
90-
static::assertContains('Processing', $html);
91-
static::assertContains('Good', $html);
87+
$block = $this->getBlock();
88+
static::assertNotEmpty($block->toHtml());
89+
static::assertContains((string) $block->getCaseGuaranteeDisposition(), $block->toHtml());
9290
}
9391

9492
/**
95-
* Renders block contents.
93+
* Gets block.
9694
*
97-
* @return string
95+
* @return CaseInfo
9896
*/
99-
private function getBlockContents()
97+
private function getBlock()
10098
{
10199
$this->layout->addContainer('order_additional_info', 'Container');
102100

@@ -105,7 +103,7 @@ private function getBlockContents()
105103
$block->setAttribute('context', $this->getContext());
106104
$block->setTemplate('Magento_Signifyd::case_info.phtml');
107105

108-
return $block->toHtml();
106+
return $block;
109107
}
110108

111109
/**

0 commit comments

Comments
 (0)