EmailTemplatesSyncTest.php 1014 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace Dotdigitalgroup\Email\Tests\Integration\Adminhtml\Developer;
  3. /**
  4. * @magentoAppArea adminhtml
  5. */
  6. class EmailTemplatesSyncTest extends \Magento\TestFramework\TestCase\AbstractBackendController
  7. {
  8. /**
  9. * @var \Magento\Framework\ObjectManagerInterface
  10. */
  11. public $objectManager;
  12. /**
  13. * @var string
  14. */
  15. public $model = \Dotdigitalgroup\Email\Model\Catalog::class;
  16. /**
  17. * @var string
  18. */
  19. public $url = 'backend/dotdigitalgroup_email/run/templatesync';
  20. public function setUp()
  21. {
  22. parent::setUp();
  23. $this->resource = 'Dotdigitalgroup_Email::config';
  24. $this->uri = $this->url;
  25. }
  26. /**
  27. * Test the redirection when sync email templates.
  28. */
  29. public function testEmailTemplatesSync()
  30. {
  31. $this->dispatch($this->url);
  32. $this->assertTrue($this->getResponse()->isRedirect(), 'Redirect back was expected.');
  33. $this->assertEquals(302, $this->getResponse()->getHttpResponseCode());
  34. }
  35. }