File tree 6 files changed +23
-9
lines changed
6 files changed +23
-9
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ COVERAGE_OUTPUT_STYLE ?= html
6
6
BUILD_DIRECTORY ?= build
7
7
REPORTS_DIRECTORY ?= ${BUILD_DIRECTORY}/reports
8
8
COVERAGE_DIRECTORY ?= ${BUILD_DIRECTORY}/coverage
9
+ BEHAT_COVERAGE_DIRECTORY ?= ${BUILD_DIRECTORY}/behat-coverage
9
10
COVERAGE_CLOVER_FILE_PATH ?= ${COVERAGE_DIRECTORY}/clover.xml
10
11
11
12
# # Commands options
@@ -88,15 +89,21 @@ codestyle: create-reports-directory
88
89
coverage : create-coverage-directory
89
90
./vendor/bin/phpunit ${PHPUNIT_COLOR_OPTION} ${PHPUNIT_OUTPUT_STYLE_OPTION} ${PHPUNIT_COVERAGE_OPTION}
90
91
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
91
95
92
96
93
97
# Internal commands
94
98
create-coverage-directory :
95
99
mkdir -p ${COVERAGE_DIRECTORY}
96
100
101
+ create-behat-coverage-directory :
102
+ mkdir -p ${BEHAT_COVERAGE_DIRECTORY}
103
+
97
104
create-reports-directory :
98
105
mkdir -p ${REPORTS_DIRECTORY}
99
106
100
107
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
102
109
.DEFAULT : build
Original file line number Diff line number Diff line change 3
3
4
4
[ ![ 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 )
5
5
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 / )
7
7
8
8
[ ![ 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 )
9
9
Original file line number Diff line number Diff line change @@ -3,3 +3,17 @@ default:
3
3
default :
4
4
contexts :
5
5
- 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
Original file line number Diff line number Diff line change 2
2
namespace Tests \Functional \BehatContext ;
3
3
4
4
use Behat \Behat \Context \Context ;
5
- use Behat \Behat \Context \Environment \InitializedContextEnvironment ;
6
- use Behat \Behat \Hook \Scope \BeforeScenarioScope ;
7
5
use Behat \Gherkin \Node \PyStringNode ;
8
6
use PHPUnit \Framework \Assert ;
9
7
use PHPUnit \Framework \Constraint \IsIdentical ;
10
- use Prophecy \Argument ;
11
8
use Symfony \Component \Validator \ValidatorBuilder ;
12
- use Tests \Functional \BehatContext \App \FakeEndpointCreator ;
13
9
use Yoanm \JsonRpcParamsSymfonyValidator \Infra \JsonRpcParamsValidator ;
14
10
use Yoanm \JsonRpcServer \Domain \Model \JsonRpcRequest ;
15
11
@@ -51,7 +47,6 @@ public function thenIShouldHaveXViolation($count = 1)
51
47
52
48
/**
53
49
* @Then I should have the following validation error:
54
- * @param PyStringNode $node
55
50
*/
56
51
public function thenIShouldHaveTheFollowingViolation (PyStringNode $ node )
57
52
{
Original file line number Diff line number Diff line change 8
8
processIsolation =" false"
9
9
10
10
stopOnRisky =" true"
11
-
12
11
stopOnError =" true"
13
12
stopOnFailure =" true"
14
13
Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ public function setUp()
36
36
37
37
public function testShouldDoNothingIfMethodDoesNotImplementSpecificInterface ()
38
38
{
39
- $ paramList = ['paramList ' ];
40
39
/** @var JsonRpcMethodInterface|ObjectProphecy $method */
41
40
$ method = $ this ->prophesize (JsonRpcMethodInterface::class);
42
41
/** @var JsonRpcRequest $jsonRpcRequest */
You can’t perform that action at this time.
0 commit comments