Skip to content

Commit 83350f2

Browse files
author
Arthur Cinader
authored
Merge pull request #317 from montymxb/add-test-dependency
Integrate Parse Server for Testing
2 parents 814a48c + 166b825 commit 83350f2

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,9 @@
22
composer.lock
33
vendor
44

5+
# npm based parse-server-test
6+
node_modules
7+
logs
8+
59
# ignore test results
610
phpunit-test-results

CONTRIBUTING.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,21 @@ Additionally you'll need to add some cloud code to it.
1717
To get started:
1818

1919
* [Get Composer], the PHP package manager.
20-
* Run "composer install" to download dependencies.
20+
* Run `composer install` to download dependencies.
2121

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

24-
To get started quickly you can clone and run this [parse server test] project.
25+
To setup the Test Parse Server:
26+
* [Get npm], you'll need this to install the server.
27+
* Run `npm install` from the project root to download the server and it's dependencies.
28+
* When you're ready to run tests use `npm start` from the project root to boot up the test server.
29+
30+
The embedded test server utilizes this [parse server test] project.
2531
It's setup with the appropriate configuration to run the php sdk test suite.
2632
Additionally it handles setting up mongodb for the server.
2733

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

3037
* [Setup a local Parse Server instance]
@@ -67,8 +74,8 @@ Please make sure that any new functionality (or issues) you are working on are c
6774
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.
6875

6976
[Get Composer]: https://getcomposer.org/download/
77+
[Get npm]: https://www.npmjs.com/get-npm
7078
[Contributor License Agreement]: https://developers.facebook.com/opensource/cla
71-
[Create Parse App]: https://parse.com/apps/new
7279
[XDebug]: https://xdebug.org/
7380
[parse server test]: https://github.com/montymxb/parse-server-test
7481
[Setup a local Parse Server instance]: https://github.com/parse-community/parse-server#user-content-locally

package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "parse-php-sdk",
3+
"scripts": {
4+
"test": "echo \"Error: no test specified\" && exit 1",
5+
"start" : "./node_modules/parse-server-test/run-server",
6+
"stop" : "mongodb-runner stop"
7+
},
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/parse-community/parse-php-sdk"
11+
},
12+
"license": "https://github.com/parse-community/parse-php-sdk/blob/master/LICENSE",
13+
"homepage": "https://github.com/montymxb/parse-server-test#readme",
14+
"dependencies": {
15+
"parse-server-test": "*"
16+
}
17+
}

0 commit comments

Comments
 (0)