Skip to content

Commit

Permalink
Repo maintenance.
Browse files Browse the repository at this point in the history
  • Loading branch information
ezzatron committed Sep 20, 2016
1 parent 5ff1a94 commit a03b1eb
Show file tree
Hide file tree
Showing 14 changed files with 3,506 additions and 103 deletions.
16 changes: 6 additions & 10 deletions .gitignore
@@ -1,10 +1,6 @@
.idea
vendor
composer.lock
*.swp
.DS_Store
tmp
docs
css
img
build
/coverage/
/css/
/docs/
/img/
/tmp/
/vendor/
52 changes: 26 additions & 26 deletions .scrutinizer.yml
@@ -1,29 +1,29 @@
filter:
paths: [src/*]
excluded_paths: [vendor/*, specs/*]
paths: [src/*]
excluded_paths: [vendor/*, specs/*]
checks:
php:
parameter_doc_comments: false
php:
parameter_doc_comments: false
tools:
php_cpd: true
php_changetracking: true
php_mess_detector:
enabled: true
config:
design_rules:
exit_expression: false
php_pdepend: true
php_analyzer:
enabled: true
config:
doc_comment_fixes:
enabled: false
verify_php_doc_comments:
enabled: false
method_contract_checks:
verify_documented_constraints: false
sensiolabs_security_checker: true
php_code_sniffer:
enabled: true
config:
standard: "PSR2"
php_cpd: true
php_changetracking: true
php_mess_detector:
enabled: true
config:
design_rules:
exit_expression: false
php_pdepend: true
php_analyzer:
enabled: true
config:
doc_comment_fixes:
enabled: false
verify_php_doc_comments:
enabled: false
method_contract_checks:
verify_documented_constraints: false
sensiolabs_security_checker: true
php_code_sniffer:
enabled: true
config:
standard: "PSR2"
60 changes: 49 additions & 11 deletions .travis.yml
@@ -1,16 +1,54 @@
language: php

php:
- 5.6
- 5.5
- 5.4
matrix:
include:
- php: 5.4
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1
- php: nightly
- php: hhvm-3.6
sudo: required
dist: trusty
group: edge
- php: hhvm-3.9
sudo: required
dist: trusty
group: edge
- php: hhvm-3.12
sudo: required
dist: trusty
group: edge
- php: hhvm-3.15
sudo: required
dist: trusty
group: edge
- php: hhvm-nightly
sudo: required
dist: trusty
group: edge
fast_finish: true
allow_failures:
- php: 7.1
- php: nightly
- php: hhvm-3.6
- php: hhvm-3.9
- php: hhvm-3.12
- php: hhvm-3.15
- php: hhvm-nightly

install:
- composer install --prefer-source
before_install: phpenv config-rm xdebug.ini || true
install: composer install --prefer-dist --no-progress --no-interaction --optimize-autoloader --ignore-platform-reqs
script: scripts/travis
after_success: scripts/travis-after

script:
- vendor/bin/peridot specs/ -r clover-code-coverage --code-coverage-path "build/logs/clover.xml"
- vendor/bin/peridot specs/
env:
global:
- PERIDOT_PUBLISH_VERSION=7.0

after_script:
- php vendor/bin/coveralls
cache:
directories:
- $HOME/.composer

sudo: false
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,4 +1,4 @@
Copyright (c) 2014 - 2015 Brian Scaturro
Copyright (c) 2014 - 2016 Brian Scaturro

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
28 changes: 28 additions & 0 deletions Makefile
@@ -0,0 +1,28 @@
test: install
php --version
vendor/bin/peridot --version
vendor/bin/peridot

coverage: install
php --version
vendor/bin/peridot --version
phpdbg -qrr vendor/bin/peridot specs -r html-code-coverage --code-coverage-path "coverage"

ci-coverage: install
php --version
vendor/bin/peridot --version
phpdbg -qrr vendor/bin/peridot specs -r clover-code-coverage --code-coverage-path "coverage/clover.xml"
vendor/bin/peridot specs

install: vendor/autoload.php

docs: install
vendor/bin/apigen generate

.PHONY: test coverage ci-coverage install

vendor/autoload.php: composer.lock
composer install

composer.lock: composer.json
composer update
88 changes: 57 additions & 31 deletions README.md
@@ -1,17 +1,34 @@
![Leo logo](https://raw.github.com/peridot-php/leo/master/leo.png "Leo logo")
![Leo logo][logo-image]

#Leo
Next level assertion library for PHP 5.4+
[logo-image]: https://raw.github.com/peridot-php/leo/master/leo.png "Leo logo"

[![Build Status](https://travis-ci.org/peridot-php/leo.svg?branch=master)](https://travis-ci.org/peridot-php/leo)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/peridot-php/leo/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/peridot-php/leo/?branch=master)
[![Coverage Status](https://coveralls.io/repos/peridot-php/leo/badge.png?branch=master)](https://coveralls.io/r/peridot-php/leo?branch=master)
# Leo

Next level assertion library for PHP

[![Current version image][version-image]][current version]
[![Current build status image][build-image]][current build status]
[![Tested against HHVM][hhvm-image]][current hhvm build status]
[![Current Scrutinizer code quality image][scrutinizer-image]][current scrutinizer code quality]
[![Current coverage status image][coverage-image]][current coverage status]

[build-image]: https://img.shields.io/travis/peridot-php/leo/master.svg?style=flat-square "Current build status for the master branch"
[coverage-image]: https://img.shields.io/codecov/c/github/peridot-php/leo/master.svg?style=flat-square "Current test coverage for the master branch"
[current build status]: https://travis-ci.org/peridot-php/leo
[current coverage status]: https://codecov.io/github/peridot-php/leo
[current hhvm build status]: http://hhvm.h4cc.de/package/peridot-php/leo
[current scrutinizer code quality]: https://scrutinizer-ci.com/g/peridot-php/leo/?branch=master
[current version]: https://packagist.org/packages/peridot-php/leo
[hhvm-image]: https://img.shields.io/hhvm/peridot-php/leo/master.svg?style=flat-square "Tested against HHVM"
[scrutinizer-image]: https://img.shields.io/scrutinizer/g/peridot-php/leo/master.svg?style=flat-square "Current Scrutinizer code quality for the master branch"
[version-image]: https://img.shields.io/packagist/v/peridot-php/leo.svg?style=flat-square "This project uses semantic versioning"

Visit the main site and documentation at [peridot-php.github.io/leo/](http://peridot-php.github.io/leo/).

##Expect Interface
## Expect Interface

Leo supports a chainable interface for writing assertions via the `expect` function.
Leo supports a chainable interface for writing assertions via the `expect`
function:

```php
expect($obj)->to->have->property('name');
Expand All @@ -21,9 +38,9 @@ expect($array)->to->be->an('array');
expect($result)->to->not->be->empty;
```

##Assert Interface
## Assert Interface

Leo supports a more object oriented, non-chainable interface via `Assert`.
Leo supports a more object oriented, non-chainable interface via `Assert`:

```php
use Peridot\Leo\Interfaces\Assert;
Expand All @@ -35,38 +52,47 @@ $assert->isResource(tmpfile());
$assert->notEqual($actual, $expected);
```

##Detailed error messages
## Detailed error messages

Leo matchers generate detailed error messages for failed assertions.
Leo matchers generate detailed error messages for failed assertions:

![Leo messages](https://raw.github.com/peridot-php/leo/master/message.png "Leo messages")
![Leo messages][error-message-image]

##Plugins
[error-message-image]: https://raw.github.com/peridot-php/leo/master/message.png "Leo messages"

Leo can be easily customized. For an example see [LeoHttpFoundation](https://github.com/peridot-php/leo-http-foundation). Read more on the [plugin guide](https://github.com/peridot-php/leo-http-foundation).
## Plugins

##Running Tests
Leo can be easily customized. For an example see [LeoHttpFoundation]. Read more
on the [plugin guide].

```
composer install
vendor/bin/peridot specs/
```
[leohttpfoundation]: https://github.com/peridot-php/leo-http-foundation
[plugin guide]: http://peridot-php.github.io/leo/plugins.html

##Generating Docs
## Running Tests

Documentation is generated via [apigen](http://apigen.org/).
make test

```
apigen generate
```
## Generating Docs

Documentation is generated via [ApiGen]. Simply run:

make docs

##Thanks
[apigen]: http://apigen.org/

## Thanks

Leo was inspired by several great projects:

* [chaijs](http://chaijs.com/) for JS
* [jasmine](http://jasmine.github.io/) for JS
* [esperance](https://github.com/esperance/esperance) for PHP
* [pho](https://github.com/danielstjules/pho) for PHP
- [Chai] for JS
- [Jasmine] for JS
- [Espérance] for PHP
- [Pho] for PHP

And of course our work on [Peridot] gave incentive to make a useful complement.

And of course our work on [Peridot](http://peridot-php.github.io/) gave incentive to make a useful complement.
[chai]: http://chaijs.com/
[espérance]: https://github.com/esperance/esperance
[jasmine]: http://jasmine.github.io/
[peridot]: http://peridot-php.github.io/
[pho]: https://github.com/danielstjules/pho
21 changes: 21 additions & 0 deletions appveyor.yml
@@ -0,0 +1,21 @@
version: "{branch}-{build}"
build: false
clone_folder: C:\projects\leo

install:
- cinst OpenSSL.Light -y
- SET PATH=C:\Program Files\OpenSSL;%PATH%
- cinst php -version 7.0.7 -y
- cd c:\tools\php
- copy php.ini-production php.ini
- echo date.timezone="UTC" >> php.ini
- echo extension_dir=ext >> php.ini
- echo extension=php_openssl.dll >> php.ini
- SET PATH=C:\tools\php;%PATH%
- cd C:\projects\leo
- php -r "readfile('http://getcomposer.org/installer');" | php
- php composer.phar install --prefer-source

test_script:
- cd C:\projects\leo
- vendor/bin/peridot specs
17 changes: 11 additions & 6 deletions composer.json
Expand Up @@ -10,17 +10,22 @@
}
],
"require": {
"php":">=5.4.0"
"php": ">=5.4"
},
"autoload": {
"psr-4": {
"Peridot\\Leo\\": "src/"
"Peridot\\Leo\\": "src"
},
"files":["src/Interfaces/_interface.bdd.php"]
"files": ["src/Interfaces/_interface.bdd.php"]
},
"require-dev": {
"peridot-php/peridot-jumpstart": "~1.0",
"peridot-php/peridot-prophecy-plugin": "~1.0",
"satooshi/php-coveralls": "~0.6"
"apigen/apigen": "^4",
"peridot-php/peridot-jumpstart": "^1",
"peridot-php/peridot-prophecy-plugin": "^1"
},
"config": {
"platform": {
"php": "5.4"
}
}
}

0 comments on commit a03b1eb

Please sign in to comment.