EntityFake.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Ui\DataProvider;
  7. /**
  8. * Fake entity object
  9. * @see \Magento\Ui\DataProvider\SearchResultFactoryTest
  10. */
  11. class EntityFake
  12. {
  13. /**
  14. * @var int
  15. */
  16. private $id;
  17. /**
  18. * @var string
  19. */
  20. private $attributeFoo;
  21. /**
  22. * @var string
  23. */
  24. private $attributeBar;
  25. /**
  26. * @param int $id
  27. * @param string $attributeFoo
  28. * @param string $attributeBar
  29. */
  30. public function __construct(int $id, string $attributeFoo, string $attributeBar)
  31. {
  32. $this->id = $id;
  33. $this->attributeFoo = $attributeFoo;
  34. $this->attributeBar = $attributeBar;
  35. }
  36. /**
  37. * @return int
  38. */
  39. public function getId(): int
  40. {
  41. return $this->id;
  42. }
  43. /**
  44. * @return string
  45. */
  46. public function getAttributeFoo(): string
  47. {
  48. return $this->attributeFoo;
  49. }
  50. /**
  51. * @return string
  52. */
  53. public function getAttributeBar(): string
  54. {
  55. return $this->attributeBar;
  56. }
  57. }