Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
Develop (#14)
Browse files Browse the repository at this point in the history
Added a new MockeryTestCase class 
removed mockery trait 
updated phpunit to v6.0 
updatedt middleware interfaces to v0.4
fixes #12 
added nyholm/nsa to suggest
  • Loading branch information
prisis authored Jul 15, 2017
1 parent 4ed46f6 commit 8a4a477
Show file tree
Hide file tree
Showing 27 changed files with 1,642 additions and 572 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/vendor
/build

composer.phar
.php_cs.cache
.DS_Store
Expand Down
20 changes: 13 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
language: php

php:
- 7.0
- 7.1

env:
global:
- setup=basic
- SEND_COVERAGE=false
- PHPSTAN=false

matrix:
fast_finish: true
include:
- php: 7.1
env: SEND_COVERAGE=true
# phpstan
- php: 7.1
env: PHPSTAN=true

sudo: false

Expand All @@ -26,9 +32,9 @@ install:

script:
- mkdir -p build/logs
- vendor/bin/php-cs-fixer fix --verbose --diff --dry-run
- vendor/bin/phpunit -c phpunit.xml.dist --verbose
- if [[ "$PHPSTAN" = false && "$SEND_COVERAGE" = true ]]; then vendor/bin/php-cs-fixer fix --verbose --diff --dry-run; fi
- if [[ "$PHPSTAN" = false && "$SEND_COVERAGE" = true ]]; then vendor/bin/phpunit -c phpunit.xml.dist --verbose --coverage-clover=coverage.xml; fi
- if [[ "$PHPSTAN" = true && "$SEND_COVERAGE" = false ]]; then ./vendor/bin/phpstan analyse -c phpstan.neon -l 6 src/TestingHelper; fi

after_script:
- if [ $TRAVIS_PHP_VERSION = "7.0" ] && [ $setup = 'basic' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ $TRAVIS_PHP_VERSION = "7.0" ] && [ $setup = 'basic' ]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/coverage.clover; fi
after_success:
- if [[ "$PHPSTAN" = false && "$SEND_COVERAGE" = true ]]; then bash <(curl -s https://codecov.io/bash); fi
74 changes: 74 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [[email protected]](mailto:[email protected]). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
54 changes: 22 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
# testing-helper

[![Author](http://img.shields.io/badge/[email protected]?style=flat-square)](https://twitter.com/@anolilab)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/narrowspark/testing-helper.svg?style=flat-square)](https://packagist.org/packages/narrowspark/testing-helper)
[![Total Downloads](https://img.shields.io/packagist/dt/narrowspark/testing-helper.svg?style=flat-square)](https://packagist.org/packages/narrowspark/testing-helper)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)

## Master

[![Build Status](https://img.shields.io/travis/narrowspark/testing-helper/master.svg?style=flat-square)](https://travis-ci.org/narrowspark/testing-helper)
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/narrowspark/testing-helper/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/narrowspark/testing-helper/code-structure)
[![Quality Score](https://img.shields.io/scrutinizer/g/narrowspark/testing-helper.svg?style=flat-square)](https://scrutinizer-ci.com/g/narrowspark/testing-helper)

## Develop

[![Build Status](https://img.shields.io/travis/narrowspark/testing-helper/develop.svg?style=flat-square)](https://travis-ci.org/narrowspark/testing-helper)
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/narrowspark/testing-helper/develop.svg?style=flat-square)](https://scrutinizer-ci.com/g/narrowspark/testing-helper/code-structure)
[![Quality Score](https://img.shields.io/scrutinizer/g/narrowspark/testing-helper/develop.svg?style=flat-square)](https://scrutinizer-ci.com/g/narrowspark/testing-helper)

## Install
<h1 align="center">Narrowspark Testing Helper</h1>
<p align="center">
<a href="https://github.com/narrowspark/testing-helper/releases"><img src="https://img.shields.io/packagist/v/narrowspark/testing-helper.svg?style=flat-square"></a>
<a href="https://php.net/"><img src="https://img.shields.io/badge/php-%5E7.1.0-8892BF.svg?style=flat-square"></a>
<a href="https://codecov.io/gh/narrowspark/testing-helper"><img src="https://img.shields.io/codecov/c/github/narrowspark/testing-helper/master.svg?style=flat-square"></a>
<a href="https://gitter.im/narrowspark/framework"><img src="https://img.shields.io/gitter/room/nwjs/nw.js.svg?style=flat-square"></a>
<a href="http://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square"></a>
</p>

Installation
-------------

Via Composer

``` bash
$ composer require narrowspark/testing-helper
```

## Usage
Usage
-------------

``` php
use Narrowspark\TestingHelper\Traits\TestHelperTrait;
Expand All @@ -44,25 +36,23 @@ class ModelTest extends \PHPUnit_Framework_TestCase
}
```

## Change log

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

## Testing
Testing
-------------

You need to run:
``` bash
$ phpunit
```

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
Contributing
------------

## Security
If you would like to help take a look at the [list of issues](http://github.com/narrowspark/testing-helper/issues) and check our [Contributing](CONTRIBUTING.md) guild.

If you discover any security related issues, please email [email protected] instead of using the issue tracker.
> **Note:** Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
## Credits
Credits
-------------

- [Daniel Bannert](https://github.com/prisis)
- [All Contributors](../../contributors)
Expand Down
11 changes: 6 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,18 @@
}
],
"require": {
"php" : "^7.0",
"php" : "^7.1",
"container-interop/container-interop" : "^1.1",
"psr/http-message" : "^1.0",
"http-interop/http-middleware" : "^0.4"
},
"require-dev": {
"guzzlehttp/psr7" : "^1.3",
"fzaninotto/faker" : "^1.6",
"phpunit/phpunit" : "^6.0",
"mockery/mockery" : "^1.0.0-alpha1",
"mockery/mockery" : "^0.9",
"narrowspark/php-cs-fixer-config" : "^2.2",
"phpunit/phpunit" : "^6.0",
"phpstan/phpstan" : "^0.7",
"roave/security-advisories" : "dev-master"
},
"autoload": {
Expand All @@ -50,8 +51,8 @@
},
"suggest": {
"fzaninotto/faker" : "Required to use the FakerTrait (^1.6)",
"mockery/mockery" : "Required to use the MockeryTrait (^0.9)",
"skagarwal/reflection" : "Required to test your private/protected methods/properties (^1.0)"
"mockery/mockery" : "Required to use the MockeryTestCase (^0.9)",
"nyholm/nsa" : "Required to test your private/protected methods/properties (^1.1)."
},
"minimum-stability" : "dev",
"prefer-stable" : true
Expand Down
Loading

0 comments on commit 8a4a477

Please sign in to comment.