AbstractJobTest.php 709 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * Copyright © 2013-2017 Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Update\Queue;
  7. class AbstractJobTest extends \PHPUnit_Framework_TestCase
  8. {
  9. public function testToString()
  10. {
  11. /** Any implementation of abstract job can be used for __toString testing */
  12. $job = new \Magento\Update\Queue\JobBackup(
  13. 'backup',
  14. ['targetArchivePath' => '/Users/john/archive.zip', 'sourceDirectory' => '/Users/john/Magento']
  15. );
  16. $this->assertEquals(
  17. 'backup {"targetArchivePath":"/Users/john/archive.zip","sourceDirectory":"/Users/john/Magento"}',
  18. (string)$job
  19. );
  20. }
  21. }