Skip to content

Integrate Parse Server for Testing #317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
composer.lock
vendor

# npm based parse-server-test
node_modules
logs

# ignore test results
phpunit-test-results
13 changes: 10 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@ Additionally you'll need to add some cloud code to it.
To get started:

* [Get Composer], the PHP package manager.
* Run "composer install" to download dependencies.
* Run `composer install` to download dependencies.

From here you have to setup an instance of parse server.
For your convenience we have included a testable version of parse server as a dev dependency.

To get started quickly you can clone and run this [parse server test] project.
To setup the Test Parse Server:
* [Get npm], you'll need this to install the server.
* Run `npm install` from the project root to download the server and it's dependencies.
* When you're ready to run tests use `npm start` from the project root to boot up the test server.

The embedded test server utilizes this [parse server test] project.
It's setup with the appropriate configuration to run the php sdk test suite.
Additionally it handles setting up mongodb for the server.

If you have specific needs and would like to alter your test server you can fork and modify the aforementioned test project.
Alternately you can configure a compatible test server as follows:

* [Setup a local Parse Server instance]
Expand Down Expand Up @@ -67,8 +74,8 @@ Please make sure that any new functionality (or issues) you are working on are c
If you have XDebug setup and can view code coverage please ensure that you do your best to completely cover any new code you are adding.

[Get Composer]: https://getcomposer.org/download/
[Get npm]: https://www.npmjs.com/get-npm
[Contributor License Agreement]: https://developers.facebook.com/opensource/cla
[Create Parse App]: https://parse.com/apps/new
[XDebug]: https://xdebug.org/
[parse server test]: https://github.com/montymxb/parse-server-test
[Setup a local Parse Server instance]: https://github.com/parse-community/parse-server#user-content-locally
17 changes: 17 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "parse-php-sdk",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start" : "./node_modules/parse-server-test/run-server",
"stop" : "mongodb-runner stop"
},
"repository": {
"type": "git",
"url": "git+https://github.com/parse-community/parse-php-sdk"
},
"license": "https://github.com/parse-community/parse-php-sdk/blob/master/LICENSE",
"homepage": "https://github.com/montymxb/parse-server-test#readme",
"dependencies": {
"parse-server-test": "*"
}
}