DocumentationTest.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\Model;
  6. use Magento\TestFramework\Helper\Bootstrap;
  7. use Magento\TestFramework\ObjectManager;
  8. class DocumentationTest extends \PHPUnit\Framework\TestCase
  9. {
  10. /** @var ObjectManager $objectManager */
  11. private $objectManager;
  12. /** @var Documentation $documentation*/
  13. private $documentation;
  14. public function setUp()
  15. {
  16. parent::setUp();
  17. $this->objectManager = Bootstrap::getObjectManager();
  18. $this->documentation= $this->objectManager->create(Documentation::class);
  19. $this->documentation->setData(DocumentationInterface::NAME, 'NAME');
  20. $this->documentation->setData(DocumentationInterface::DOCUMENTATION_ID, 'DOCUMENTATION_ID');
  21. $this->documentation->setData(DocumentationInterface::MIME_TYPE, 'MIME_TYPE');
  22. $this->documentation->setData(DocumentationInterface::SIZE, 'SIZE');
  23. $this->documentation->setData(DocumentationInterface::TYPE, 'TYPE');
  24. $this->documentation->setData(DocumentationInterface::URL, 'URL');
  25. }
  26. /**
  27. * @test
  28. */
  29. public function getNameTest()
  30. {
  31. $result = $this->documentation->getName();
  32. $this->assertEquals($result, "NAME");
  33. }
  34. /**
  35. * @test
  36. */
  37. public function getDocumentationIdTest()
  38. {
  39. $result = $this->documentation->getDocumentationId();
  40. $this->assertEquals($result, "DOCUMENTATION_ID");
  41. }
  42. /**
  43. * @test
  44. */
  45. public function getMimeTypeTest()
  46. {
  47. $result = $this->documentation->getMimeType();
  48. $this->assertEquals($result, "MIME_TYPE");
  49. }
  50. /**
  51. * @test
  52. */
  53. public function getSizeTest()
  54. {
  55. $result = $this->documentation->getSize();
  56. $this->assertEquals($result, "SIZE");
  57. }
  58. /**
  59. * @test
  60. */
  61. public function getTypeTest()
  62. {
  63. $result = $this->documentation->getType();
  64. $this->assertEquals($result, "TYPE");
  65. }
  66. /**
  67. * @test
  68. */
  69. public function getUrlTest()
  70. {
  71. $result = $this->documentation->getUrl();
  72. $this->assertEquals($result, "URL");
  73. }
  74. }