Skip to content

Instantly share code, notes, and snippets.

@whatafunc
Created October 11, 2023 15:03
Show Gist options
  • Save whatafunc/63ea8e04aaf3f5a412dcf38b6e57b3dc to your computer and use it in GitHub Desktop.
Save whatafunc/63ea8e04aaf3f5a412dcf38b6e57b3dc to your computer and use it in GitHub Desktop.
composer.json example for developing a module for OC and test it by PHPUnit tests
{
"name" : "whatafunc/opencart-project",
"description": "develop some bespoke functionality and test it with automatic testing such as PHPUnit tests",
"homepage" : "localhost:8000",
"license" : "",
"require-dev" : {
"robmorgan/phinx": "^0.9.2",
"squizlabs/php_codesniffer" : "*"
},
"scripts" : {
"test" : "vendor/bin/phpunit",
"code-check" : "vendor/squizlabs/php_codesniffer/bin/phpcs --standard=PSR2 public",
"code-fix" : "vendor/squizlabs/php_codesniffer/bin/phpcbf --standard=PSR2 public",
"testscode-check" : "vendor/squizlabs/php_codesniffer/bin/phpcs --standard=PSR2 tests",
"testscode-fix" : "vendor/squizlabs/php_codesniffer/bin/phpcbf --standard=PSR2 tests"
},
"require": {
"kunalvarma05/dropbox-php-sdk": "^0.2.1",
"zoujingli/wechat-php-sdk": "^1.3",
"phpunit/phpunit": "^9"
}
}
@whatafunc
Copy link
Author

Thanks for checking :)
In the YT video you could notice I also do PHPunit tests so if you are interested here are some PHPunit tests I have published here in git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment