-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
157 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
Behat Coverage Extension [![License](https://img.shields.io/packagist/l/doyo/behat-code-coverage.svg?style=flat-square)](#License) | ||
Behat Code Coverage Extension | ||
--- | ||
Provide code coverage extension during behat tests | ||
|
||
### Status | ||
| Branch | Status | Coverage | Score | | ||
| :---: | :---: | :---: | :---: | | ||
| **master** | [![Build Status][travis-master]][travis] | [![Coverage][cover-stat-master]][cover-master] | [![Score][score-stat-master]][score-master] | ||
| **develop** | [![Build Status][travis-develop]][travis] | [![Coverage][cover-stat-develop]][cover-develop] | [![Score][score-stat-develop]][score-develop] | ||
[![License][behat-license-badge]][behat-license] | ||
[![Version][behat-version-badge]][behat-version] | ||
[![Build Status][behat-travis-badge]][behat-travis] | ||
[![Coverage][behat-cover-badge]][behat-cover] | ||
[![Score][behat-score-badge]][behat-score] | ||
|
||
|
||
### Support | ||
* PHP: >=7.0 | ||
* Behat: >=3.0 | ||
* PHP Code Coverage: >=5.3 | ||
|
||
[travis]: https://travis-ci.com/doyolabs/behat-code-coverage | ||
[travis-master]: https://img.shields.io/travis/com/doyolabs/behat-code-coverage/master.svg?style=flat-square | ||
[travis-develop]: https://img.shields.io/travis/com/doyolabs/behat-code-coverage/develop.svg?style=flat-square | ||
[cover-master]: https://coveralls.io/github/doyolabs/behat-code-coverage?branch=master | ||
[cover-develop]: https://coveralls.io/github/doyolabs/behat-code-coverage?branch=develop | ||
[cover-stat-develop]: https://img.shields.io/coveralls/github/doyolabs/behat-code-coverage/develop.svg?style=flat-square | ||
[cover-stat-master]: https://img.shields.io/coveralls/github/doyolabs/behat-code-coverage/master.svg?style=flat-square | ||
[score-master]: https://scrutinizer-ci.com/g/doyolabs/behat-code-coverage/?branch=master | ||
[score-develop]: https://scrutinizer-ci.com/g/doyolabs/behat-code-coverage/?branch=develop | ||
[score-stat-develop]: https://img.shields.io/scrutinizer/quality/g/doyolabs/behat-code-coverage/develop.svg?style=flat-square | ||
[score-stat-master]: https://img.shields.io/scrutinizer/quality/g/doyolabs/behat-code-coverage/master.svg?style=flat-square | ||
[behat]: https://github.com/doyolabs/behat-code-coverage | ||
[behat-license]: https://github.com/doyolabs/behat-code-coverage/blob/master/LICENSE | ||
[behat-license-badge]: https://img.shields.io/packagist/l/doyo/behat-code-coverage.svg?style=flat-square | ||
[behat-version]: https://packagist.org/packages/doyo/behat-code-coverage | ||
[behat-version-badge]: https://img.shields.io/packagist/vpre/doyo/behat-code-coverage.svg?style=flat-square | ||
[behat-travis]: https://travis-ci.com/doyolabs/behat-code-coverage | ||
[behat-travis-badge]: https://img.shields.io/travis/com/doyolabs/behat-code-coverage/master.svg?style=flat-square | ||
[behat-cover]: https://coveralls.io/github/doyolabs/behat-code-coverage?branch=master | ||
[behat-cover-badge]: https://img.shields.io/coveralls/github/doyolabs/behat-code-coverage/master.svg?style=flat-square | ||
[behat-score]: https://scrutinizer-ci.com/g/doyolabs/behat-code-coverage/?branch=master | ||
[behat-score-badge]: https://img.shields.io/scrutinizer/quality/g/doyolabs/behat-code-coverage/master.svg?style=flat-square |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
|
||
namespace Doyo\Bridge\CodeCoverage\Session; | ||
|
||
|
||
use Doyo\Bridge\CodeCoverage\Driver\Dummy; | ||
use Doyo\Bridge\CodeCoverage\Processor; | ||
use Symfony\Component\DependencyInjection\ContainerInterface; | ||
|
||
class SessionFactory | ||
{ | ||
public function createLocalSession(ContainerInterface $container, $name) | ||
{ | ||
$session = new LocalSession($name); | ||
$this->decorateSession($container, $session); | ||
} | ||
|
||
protected function decorateSession(ContainerInterface $container, SessionInterface $session) | ||
{ | ||
$filter = $container->get('coverage.filter'); | ||
$dummy = $container->getParameter(new Dummy()); | ||
|
||
$processor = new Processor($dummy, $filter); | ||
$session->setProcessor($processor); | ||
$session->setContainer($container); | ||
$session->save(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters