@@ -51,7 +51,7 @@ public function testModuleIsInactive()
51
51
{
52
52
$ this ->order ->loadByIncrementId ('100000001 ' );
53
53
54
- static ::assertNotEmpty ($ this ->getBlockContents ());
54
+ static ::assertNotEmpty ($ this ->getBlock ()-> toHtml ());
55
55
}
56
56
57
57
/**
@@ -67,14 +67,13 @@ public function testCaseEntityNotExists()
67
67
{
68
68
$ this ->order ->loadByIncrementId ('100000001 ' );
69
69
70
- static ::assertEmpty ($ this ->getBlockContents ());
70
+ static ::assertEmpty ($ this ->getBlock ()-> toHtml ());
71
71
}
72
72
73
73
/**
74
74
* Checks that:
75
75
* - block give contents
76
- * - associated team displays correct
77
- * - score class displays correct
76
+ * - block contents guarantee decision field
78
77
*
79
78
* @covers \Magento\Signifyd\Block\Adminhtml\CaseInfo::getScoreClass
80
79
* @magentoConfigFixture current_store fraud_protection/signifyd/active 1
@@ -85,18 +84,17 @@ public function testCaseEntityExists()
85
84
{
86
85
$ this ->order ->loadByIncrementId ('100000001 ' );
87
86
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 ());
92
90
}
93
91
94
92
/**
95
- * Renders block contents .
93
+ * Gets block.
96
94
*
97
- * @return string
95
+ * @return CaseInfo
98
96
*/
99
- private function getBlockContents ()
97
+ private function getBlock ()
100
98
{
101
99
$ this ->layout ->addContainer ('order_additional_info ' , 'Container ' );
102
100
@@ -105,7 +103,7 @@ private function getBlockContents()
105
103
$ block ->setAttribute ('context ' , $ this ->getContext ());
106
104
$ block ->setTemplate ('Magento_Signifyd::case_info.phtml ' );
107
105
108
- return $ block-> toHtml () ;
106
+ return $ block ;
109
107
}
110
108
111
109
/**
0 commit comments