DumbController.php 722 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. // Copyright 2019 Hackware SpA <human@hackware.cl>
  3. // "Hackware Web Services Core" is released under the MIT License terms.
  4. namespace Hawese\Tests;
  5. use Illuminate\Http\Request;
  6. use Hawese\Core\Http\Controllers\Controller;
  7. /**
  8. * Just a dumb class, exposes private methods of Controller.
  9. * I want this methods to be private, but also need to test them.
  10. */
  11. class DumbController extends Controller
  12. {
  13. public function singleResponse($obj): object
  14. {
  15. return parent::singleResponse($obj);
  16. }
  17. public function collectionResponse(
  18. Request $request,
  19. $model,
  20. $filters_cb = null
  21. ): array {
  22. return parent::collectionResponse($request, $model, $filters_cb);
  23. }
  24. }