Guest User

Untitled

a guest
Jan 23rd, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. composer.json
  2. composer.lock
  3. phpunit.xml
  4. vendor/
  5. tests/
  6. functional/
  7. BaseTestCase.php
  8. HomepageTest.php
  9.  
  10. {
  11. "require": {
  12. "php": ">=5.5.0",
  13. "slim/slim": "^3.1",
  14. "slim/php-view": "^2.0",
  15. "monolog/monolog": "^1.17"
  16. },
  17. "require-dev": {
  18. "phpunit/phpunit": ">=4.8 < 6.0"
  19. },
  20. "autoload-dev": {
  21. "psr-4": {
  22. "Tests\": "tests/"
  23. }
  24. }
  25. }
  26.  
  27. <?xml version="1.0" encoding="utf-8" ?>
  28. <phpunit colors="true" bootstrap="vendor/autoload.php">
  29. <testsuites>
  30. <testsuite name="Initial tests">
  31. <directory>tests/</directory>
  32. </testsuite>
  33. </testsuites>
  34. </phpunit>
  35.  
  36. <?php
  37. namespace TestsFunctional;
  38.  
  39. use SlimApp;
  40. use SlimHttpRequest;
  41. use SlimHttpResponse;
  42. use SlimHttpEnvironment;
  43.  
  44. class BaseTestCase extends PHPUnit_Framework_TestCase
  45. {
  46. ...
  47.  
  48. <?php
  49. namespace TestsFunctional;
  50.  
  51. class HomepageTest extends BaseTestCase
  52. {
  53. ...
  54.  
  55. $ composer update
  56.  
  57. Loading composer repositories with package information
  58. Updating dependencies (including require-dev)
  59. Nothing to install or update
  60. Writing lock file
  61. Generating autoload files
  62.  
  63. $ vendor/bin/phpunit
  64.  
  65. PHP Fatal error: Class 'TestsFunctionalBaseTestCase' not found in <project-root>/tests/functional/HomepageTest.php on line 6
  66.  
  67. $ composer dump-autoload
  68.  
  69. Generating autoload files
  70. sfbagency@sfb1:~/clients/ctest/dev$
  71.  
  72. ...
  73. Tests\' => array($baseDir . '/tests'),
  74. ...
  75.  
  76. src/
  77. tests/
  78. Models/
  79. ModelOneTest.php
  80. ModelTwoTest.php <---
  81. Fixtures/
  82. Fixtures.php
Add Comment
Please, Sign In to add comment