Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork0
Create throw away composer projects for Codeception tests
License
typisttech/codeception-composer-project-module
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Create throw away composer projects for Codeception tests.
Built with ♥ byTypist Tech
Codeception Composer Project Module is an open source project and completely free to use.
However, the amount of effort needed to maintain and develop new features is not sustainable without proper financial backing. If you have the capability, please consider donating using the links below:
Create throw away composer projects for Codeception tests.
Because it's good to test your composer plugins in a more realistic environment.
Create throw away composer projects for Codeception tests.
Before each test:
- Copy dummy composer project files to a temporary directory
- Config local packages paths
- Install package via composer
- Change directory into the temporary directory
After each test:
- Delete the temporary directory
composer require --dev typisttech/codeception-composer-project-module
In your Codeception config file (e.g:acceptance.suite.yml oracceptance.yml):
This is the minimal config:
modules:enabled: -ComposerProject:projectRoot:'path/to/composer/project'depends: -Cli -Filesystem
This is the full config:
modules:enabled: -ComposerProject:projectRoot:'path/to/composer/project'composerInstallFlags:'--no-interaction --quiet'symlink:'true'repositoryPaths: -'tests/_data/dummy' -'tests/_data/another-dummy'depends: -Cli -Filesystem
Required String
Example:tests/_data/project
Path to the composer project directory, relative to the root directory (wherecodeception.yml is located).This directory must contain acomposer.json file.
Optional String
Example:--no-interaction --verbose --no-ansi
Default:--no-interaction --quiet
Extra flags to pass in duringcomposer install.
Optional Boolean insingle quotes
Example:'false'
Default:'true'
Should the local packages be symlink-ed or not.
Optional Array of strings
Example:
-'tests/_data/dummy'-'tests/_data/another-dummy'
Default: The root directory (wherecodeception.yml is located).
Paths to local packages, relative to the root directory (wherecodeception.yml is located).
Typist Tech is ready to build your next awesome WordPress site.Hire us!
Change directory to the temporary project directory
- @return void
Example:
$I->amInTmpProjectDir();
Run a composer command
- @param string $command
- @param bool $failNonZero Optional. Default: trueFails If exit code is > 0.
- @return void
Example:
// This is equivalent to running `$ composer update --verbose` in the console.$I->runComposerCommand('update --verbose');
Runcomposer install withcomposerInstallFlags
- @return void
Example:
$I->runComposerInstall();
Get the path to the temporary project directory
Note: Return value maybe a symbolic link.
- @return string
Example:
$I->getTmpProjectDir();// To ensure real path:$tmpProjectDir =$I->getTmpProjectDir();$tmpProjectDir =realpath($tmpProjectDir);
Both v1 and v2.
Run the tests with the--debug flag.
Codeception Composer Project Module will log debug message to the console.
Your requirements could not be resolved to an installable set of packages.
Make sure you have packageversion constraints andminimum stability set up correctly.
{"require": {"dummy/dummy":"*" },"minimum-stability":"dev"}- Enablesymlink
- Add
--prefer-disttocomposerInstallFlags - Add
"prefer-stable": truetocomposer.json
Note: These methods are not suitable for every use case.
Here you go:
Add your ownhere
Never! This plugin will only work onactively supported PHP versions.
Don't use it onend of life orsecurity fixes only PHP versions.
- Articles onTypist Tech's blog
- Tang Rufus' WordPress plugins on wp.org
- More projects onTypist Tech's GitHub profile
- Stay tuned onTypist Tech's newsletter
- FollowTang Rufus' Twitter account
- HireTang Rufus to build your next awesome site
Thanks! Glad you like it. It's important to let me knows somebody is using this project. Please consider:
- tweet something good with mentioning@TangRufus
- ★ starthe Github repo
- 👀 watch the Github repo
- write tutorials and blog posts
- hire Typist Tech
composertestcomposer style:checkPlease provide feedback! We want to make this project as useful as possible.Pleasesubmit an issue and point out what you do and don't like, or fork the project andsend pull requests.No issue is too small.
If you discover a security vulnerability within this project, please email us atcodeception-composer-project-module@typist.tech.All security vulnerabilities will be promptly addressed.
Codeception Composer Project Module is aTypist Tech project and maintained byTang Rufus, freelance developer forhire.
Full list of contributors can be foundhere.
Codeception Composer Project Module is released under theMIT License.
About
Create throw away composer projects for Codeception tests
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.