Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
FingerprintTest.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Signifyd\Block;
7 
12 
13 class FingerprintTest extends \PHPUnit\Framework\TestCase
14 {
18  private $objectManager;
19 
23  protected function setUp()
24  {
27 
28  $this->objectManager = Bootstrap::getObjectManager();
29  }
30 
36  public function testSessionIdPresent()
37  {
38  self::assertContains('data-order-session-id', $this->getBlockContents());
39  }
40 
46  public function testBlockEmpty()
47  {
48  self::assertEmpty($this->getBlockContents());
49  }
50 
56  private function getBlockContents()
57  {
58  $block = $this->objectManager->get(LayoutInterface::class)
59  ->createBlock(Fingerprint::class);
60 
61  return $block->fetchView($block->getTemplateFile());
62  }
63 }
$block
Definition: block.php:8
if(defined('TESTS_MAGENTO_INSTALLATION') &&TESTS_MAGENTO_INSTALLATION==='enabled') $bootstrap
Definition: bootstrap.php:73