LoadTest.php 655 B

123456789101112131415161718192021
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Customer\Controller\Section;
  7. class LoadTest extends \Magento\TestFramework\TestCase\AbstractController
  8. {
  9. public function testLoadInvalidSection()
  10. {
  11. $expected = [
  12. 'message' => 'The &quot;section&lt;invalid&quot; section source isn&#039;t supported.',
  13. ];
  14. $this->dispatch(
  15. '/customer/section/load/?sections=section<invalid&force_new_section_timestamp=false&_=147066166394'
  16. );
  17. self::assertEquals(json_encode($expected), $this->getResponse()->getBody());
  18. }
  19. }