Skip to content

Commit 982f235

Browse files
authored
Improve (#7)
1 parent cf29cf0 commit 982f235

File tree

6 files changed

+23
-9
lines changed

6 files changed

+23
-9
lines changed

Diff for: Makefile

+8-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ COVERAGE_OUTPUT_STYLE ?= html
66
BUILD_DIRECTORY ?= build
77
REPORTS_DIRECTORY ?= ${BUILD_DIRECTORY}/reports
88
COVERAGE_DIRECTORY ?= ${BUILD_DIRECTORY}/coverage
9+
BEHAT_COVERAGE_DIRECTORY ?= ${BUILD_DIRECTORY}/behat-coverage
910
COVERAGE_CLOVER_FILE_PATH ?= ${COVERAGE_DIRECTORY}/clover.xml
1011

1112
## Commands options
@@ -88,15 +89,21 @@ codestyle: create-reports-directory
8889
coverage: create-coverage-directory
8990
./vendor/bin/phpunit ${PHPUNIT_COLOR_OPTION} ${PHPUNIT_OUTPUT_STYLE_OPTION} ${PHPUNIT_COVERAGE_OPTION}
9091

92+
behat-coverage: create-behat-coverage-directory
93+
composer required leanphp/behat-code-coverage
94+
./vendor/bin/behat ${BEHAT_COLOR_OPTION} ${BEHAT_OUTPUT_STYLE_OPTION} --no-snippets --profile coverage
9195

9296

9397
# Internal commands
9498
create-coverage-directory:
9599
mkdir -p ${COVERAGE_DIRECTORY}
96100

101+
create-behat-coverage-directory:
102+
mkdir -p ${BEHAT_COVERAGE_DIRECTORY}
103+
97104
create-reports-directory:
98105
mkdir -p ${REPORTS_DIRECTORY}
99106

100107

101-
.PHONY: build install configure test test-technical test-functional codestyle coverage create-coverage-directory create-reports-directory
108+
.PHONY: build install configure test test-technical test-functional codestyle coverage behat-coverage create-coverage-directory create-behat-coverage-directory create-reports-directory
102109
.DEFAULT: build

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[![Scrutinizer Build Status](https://img.shields.io/scrutinizer/build/g/yoanm/php-jsonrpc-params-symfony-validator-sdk.svg?label=Scrutinizer&logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/php-jsonrpc-params-symfony-validator-sdk/build-status/master) [![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/yoanm/php-jsonrpc-params-symfony-validator-sdk/master.svg?logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/php-jsonrpc-params-symfony-validator-sdk/?branch=master) [![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/yoanm/php-jsonrpc-params-symfony-validator-sdk/master.svg?logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/php-jsonrpc-params-symfony-validator-sdk/?branch=master)
55

6-
[![Travis Build Status](https://img.shields.io/travis/com/yoanm/php-jsonrpc-params-symfony-validator-sdk/master.svg?label=Travis&logo=travis)](https://travis-ci.com/yoanm/php-jsonrpc-params-symfony-validator-sdk) [![Travis PHP versions](https://img.shields.io/travis/php-v/yoanm/php-jsonrpc-params-symfony-validator-sdk.svg?logo=travis)](https://php.net/) [![Travis Symfony Versions](https://img.shields.io/badge/Symfony-v3%20%2F%20v4-8892BF.svg?logo=travis)](https://symfony.com/)
6+
[![Travis Build Status](https://img.shields.io/travis/com/yoanm/php-jsonrpc-params-symfony-validator-sdk/master.svg?label=Travis&logo=travis)](https://travis-ci.com/yoanm/php-jsonrpc-params-symfony-validator-sdk) [![Travis PHP versions](https://img.shields.io/travis/php-v/yoanm/php-jsonrpc-params-symfony-validator-sdk.svg?logo=travis)](https://travis-ci.com/yoanm/php-jsonrpc-params-symfony-validator-sdk) [![Travis Symfony Versions](https://img.shields.io/badge/Symfony-v3%20%2F%20v4-8892BF.svg?logo=travis)](https://php.net/)
77

88
[![Latest Stable Version](https://img.shields.io/packagist/v/yoanm/jsonrpc-params-symfony-validator-sdk.svg)](https://packagist.org/packages/yoanm/jsonrpc-params-symfony-validator-sdk) [![Packagist PHP version](https://img.shields.io/packagist/php-v/yoanm/jsonrpc-params-symfony-validator-sdk.svg)](https://packagist.org/packages/yoanm/jsonrpc-params-symfony-validator-sdk)
99

Diff for: behat.yml

+14
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,17 @@ default:
33
default:
44
contexts:
55
- Tests\Functional\BehatContext\FeatureContext: ~
6+
coverage:
7+
extensions:
8+
LeanPHP\Behat\CodeCoverage\Extension:
9+
drivers:
10+
- local
11+
filter:
12+
whitelist:
13+
include:
14+
directories:
15+
'src': ~
16+
report:
17+
format: html
18+
options:
19+
target: build/behat-coverage

Diff for: features/bootstrap/FeatureContext.php

-5
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@
22
namespace Tests\Functional\BehatContext;
33

44
use Behat\Behat\Context\Context;
5-
use Behat\Behat\Context\Environment\InitializedContextEnvironment;
6-
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
75
use Behat\Gherkin\Node\PyStringNode;
86
use PHPUnit\Framework\Assert;
97
use PHPUnit\Framework\Constraint\IsIdentical;
10-
use Prophecy\Argument;
118
use Symfony\Component\Validator\ValidatorBuilder;
12-
use Tests\Functional\BehatContext\App\FakeEndpointCreator;
139
use Yoanm\JsonRpcParamsSymfonyValidator\Infra\JsonRpcParamsValidator;
1410
use Yoanm\JsonRpcServer\Domain\Model\JsonRpcRequest;
1511

@@ -51,7 +47,6 @@ public function thenIShouldHaveXViolation($count = 1)
5147

5248
/**
5349
* @Then I should have the following validation error:
54-
* @param PyStringNode $node
5550
*/
5651
public function thenIShouldHaveTheFollowingViolation(PyStringNode $node)
5752
{

Diff for: phpunit.xml.dist

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
processIsolation="false"
99

1010
stopOnRisky="true"
11-
1211
stopOnError="true"
1312
stopOnFailure="true"
1413

Diff for: tests/Functional/Infra/JsonRpcParamsValidatorTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public function setUp()
3636

3737
public function testShouldDoNothingIfMethodDoesNotImplementSpecificInterface()
3838
{
39-
$paramList = ['paramList'];
4039
/** @var JsonRpcMethodInterface|ObjectProphecy $method */
4140
$method = $this->prophesize(JsonRpcMethodInterface::class);
4241
/** @var JsonRpcRequest $jsonRpcRequest */

0 commit comments

Comments
 (0)