InfoTest.php 917 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Customer\Block\Account\Dashboard;
  7. class InfoTest extends \PHPUnit\Framework\TestCase
  8. {
  9. /**
  10. * @var \Magento\Customer\Block\Account\Dashboard\Info
  11. */
  12. protected $_block;
  13. protected function setUp()
  14. {
  15. $this->_block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
  16. \Magento\Framework\View\LayoutInterface::class
  17. )->createBlock(
  18. \Magento\Customer\Block\Account\Dashboard\Info::class
  19. );
  20. }
  21. public function testGetSubscriptionObject()
  22. {
  23. $object = $this->_block->getSubscriptionObject();
  24. $this->assertInstanceOf(\Magento\Newsletter\Model\Subscriber::class, $object);
  25. $object2 = $this->_block->getSubscriptionObject();
  26. $this->assertSame($object, $object2);
  27. }
  28. }