DeliveryTermTest.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * @copyright Vertex. All rights reserved. https://www.vertexinc.com/
  4. * @author Mediotype https://www.mediotype.com/
  5. */
  6. namespace Vertex\Tax\Test\Unit\Model\Config\Source;
  7. use Magento\Framework\Data\OptionSourceInterface;
  8. use Vertex\Tax\Model\Config\Source\DeliveryTerm;
  9. use Vertex\Tax\Test\Unit\TestCase;
  10. /**
  11. * Test Class @see DeliveryTerm
  12. */
  13. class DeliveryTermTest extends TestCase
  14. {
  15. /**
  16. * Check if object is an instance of @see OptionSourceInterface
  17. *
  18. * @return void
  19. */
  20. public function testImplementsOptionSourceInterface()
  21. {
  22. $object = $this->createObject();
  23. $this->assertInstanceOf(OptionSourceInterface::class, $object);
  24. }
  25. /**
  26. * Test if type is an array
  27. *
  28. * @return void
  29. */
  30. public function testReturnArray()
  31. {
  32. $object = $this->createObject();
  33. $this->assertInternalType('array', $object->toOptionArray());
  34. }
  35. /**
  36. * Create Object DeliveryTerm
  37. *
  38. * @return DeliveryTerm
  39. */
  40. private function createObject()
  41. {
  42. return $this->getObject(DeliveryTerm::class);
  43. }
  44. }