Skip to content
Open
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
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/vendor
/.idea
/.vscode
/.vscode
/docker
docker-compose.yml
supervisord.log
supervisord.pid
test.php
.phpunit.result.cache
phpunit-export.json
19 changes: 19 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,22 @@ $collection->header($key, $value);
$item->header($key, $value);
$request->header($key, $value);
```

### Exporting

Collections can be exported to the filesystem as well as serving them to your browser, you can even
handle the json yourself using the `toJson()` or `toArray()` methods.

```php
$collection->toFile('path/postman-collection.json');
$collection->download();
$collection->serve();
```

## Testing

To run the tests install all the dependencies using composer and then simply run:

```bash
composer test
```
22 changes: 20 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,37 @@
"type": "library",
"require": {
"php": "^8.0",
"ext-json": "*",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requirement is not further required as we are on php ^8.0

PHP 8 ext-json

"ramsey/uuid": "^4.2.2"
},
"require-dev": {
"phpunit/phpunit": "10.0.x-dev"
},
"license": "MIT",
"autoload": {
"psr-4": {
"WebScientist\\Postman\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"authors": [
{
"name": "Chinmay Purav",
"email": "experiment@webscientist.xyz"
}
],
"minimum-stability": "dev"
}
"scripts": {
"test": "phpunit"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
Loading