Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
QuoteIdMaskTest.php
Go to the documentation of this file.
1 <?php
8 
10 
14 class QuoteIdMaskTest extends \PHPUnit\Framework\TestCase
15 {
19  protected $quoteIdMask;
20 
21  protected function setUp()
22  {
23  $helper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
24  $this->quoteIdMask = $helper->getObject(
25  \Magento\Quote\Model\QuoteIdMask::class,
26  ['randomDataGenerator' => new Random()]
27  );
28  }
29 
30  public function testBeforeSave()
31  {
32  $this->quoteIdMask->beforeSave();
33  $this->assertNotNull($this->quoteIdMask->getMaskedId(), 'Masked identifier is not generated.');
34  }
35 }
$helper
Definition: iframe.phtml:13