Test3Behavior.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. declare(strict_types=1);
  3. namespace TestApp\Model\Behavior;
  4. use Cake\ORM\Behavior;
  5. class Test3Behavior extends Behavior
  6. {
  7. /**
  8. * Test for event bindings.
  9. */
  10. public function beforeFind(): void
  11. {
  12. }
  13. /**
  14. * Test finder
  15. */
  16. public function findFoo(): void
  17. {
  18. }
  19. /**
  20. * Test method
  21. */
  22. public function doSomething(): void
  23. {
  24. }
  25. /**
  26. * Test method to ensure it is ignored as a callable method.
  27. */
  28. public function verifyConfig(): void
  29. {
  30. parent::verifyConfig();
  31. }
  32. /**
  33. * implementedEvents
  34. *
  35. * This class does pretend to implement beforeFind
  36. *
  37. * @return array<string, mixed>
  38. */
  39. public function implementedEvents(): array
  40. {
  41. return ['Model.beforeFind' => 'beforeFind'];
  42. }
  43. /**
  44. * implementedFinders
  45. */
  46. public function implementedFinders(): array
  47. {
  48. }
  49. /**
  50. * implementedMethods
  51. */
  52. public function implementedMethods(): array
  53. {
  54. }
  55. /**
  56. * Expose protected method for testing
  57. *
  58. * Since this is public - it'll show up as callable which is a side-effect
  59. *
  60. * @return array
  61. */
  62. public function testReflectionCache(): array
  63. {
  64. return $this->_reflectionCache();
  65. }
  66. }