File tree Expand file tree Collapse file tree 8 files changed +25
-26
lines changed
features/demo_app/src/Method Expand file tree Collapse file tree 8 files changed +25
-26
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ COVERAGE_OUTPUT_STYLE ?= html
66BUILD_DIRECTORY ?= build
77REPORTS_DIRECTORY ?= ${BUILD_DIRECTORY}/reports
88COVERAGE_DIRECTORY ?= ${BUILD_DIRECTORY}/coverage
9+ BEHAT_COVERAGE_DIRECTORY ?= ${BUILD_DIRECTORY}/behat-coverage
910COVERAGE_CLOVER_FILE_PATH ?= ${COVERAGE_DIRECTORY}/clover.xml
1011
1112# # Commands options
@@ -88,15 +89,21 @@ codestyle: create-reports-directory
8889coverage : 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
9498create-coverage-directory :
9599 mkdir -p ${COVERAGE_DIRECTORY}
96100
101+ create-behat-coverage-directory :
102+ mkdir -p ${BEHAT_COVERAGE_DIRECTORY}
103+
97104create-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
Original file line number Diff line number Diff line change @@ -3,3 +3,17 @@ default:
33 default :
44 contexts :
55 - Tests\Functional\BehatContext\DemoAppContext : ~
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 3636 "symfony/dependency-injection" : " ^3.0 || ^4.0"
3737 },
3838 "require-dev" : {
39+ "ext-json" : " *" ,
3940 "behat/behat" : " ~3.0" ,
4041 "squizlabs/php_codesniffer" : " 3.*" ,
4142 "phpunit/phpunit" : " ^6.0 || ^7.0" ,
Original file line number Diff line number Diff line change 99
1010class MethodA implements JsonRpcMethodInterface, MethodWithValidatedParamsInterface
1111{
12- /**
13- * {@inheritdoc}
14- */
15- public function validateParams (array $ paramList ) : array
16- {
17- return [];
18- }
19-
2012 /**
2113 * {@inheritdoc}
2214 */
Original file line number Diff line number Diff line change 55
66class MethodB implements JsonRpcMethodInterface
77{
8- /**
9- * {@inheritdoc}
10- */
11- public function validateParams (array $ paramList ) : array
12- {
13- return [];
14- }
15-
168 /**
179 * {@inheritdoc}
1810 */
Original file line number Diff line number Diff line change 1010
1111class MethodC implements JsonRpcMethodInterface, MethodWithValidatedParamsInterface
1212{
13- /**
14- * {@inheritdoc}
15- */
16- public function validateParams (array $ paramList ) : array
17- {
18- return [];
19- }
20-
2113 /**
2214 * {@inheritdoc}
2315 */
Original file line number Diff line number Diff line change 88 processIsolation =" false"
99
1010 stopOnRisky =" true"
11-
1211 stopOnError =" true"
1312 stopOnFailure =" true"
1413
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ public function __construct(ConstraintToParamsDocTransformer $paramDocConverter)
2323
2424 /**
2525 * @param MethodDocCreatedEvent $event
26+ *
27+ * @throws \ReflectionException
2628 */
2729 public function enhanceMethodDoc (MethodDocCreatedEvent $ event )
2830 {
You can’t perform that action at this time.
0 commit comments