Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

fix: use prophecy for php generated unit tests #3225

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

fix: use prophecy for php generated unit tests #3225

wants to merge 2 commits into from

Conversation

jdpedrie
Copy link
Contributor

PHPUnit 5 is still required by Google Cloud PHP since it has support for PHP 5. However in PHP 7.4 the PHPUnit mock builder raises the error Function ReflectionType::__toString() is deprecated, causing generated unit tests to fail.

This change switches to the Prophecy mock library (bundled with PHPUnit), which has better support for PHP 7.4.

@jdpedrie jdpedrie requested a review from dwsupplee June 10, 2020 13:32
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 10, 2020
@codecov
Copy link

codecov bot commented Jun 10, 2020

Codecov Report

Merging #3225 into master will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #3225   +/-   ##
=========================================
  Coverage     87.12%   87.12%           
+ Complexity     6080     6077    -3     
=========================================
  Files           494      494           
  Lines         24060    24052    -8     
  Branches       2613     2613           
=========================================
- Hits          20962    20956    -6     
+ Misses         2236     2234    -2     
  Partials        862      862           
Impacted Files Coverage Δ Complexity Δ
...om/google/api/codegen/gapic/ProtocGapicWriter.java 66.66% <0.00%> (-2.57%) 5.00% <0.00%> (ø%)
...rc/main/java/com/google/api/codegen/util/Name.java 82.35% <0.00%> (-2.17%) 57.00% <0.00%> (-3.00%)
...oogle/api/codegen/config/DiscoveryMethodModel.java 85.04% <0.00%> (-0.14%) 47.00% <0.00%> (-1.00%)
...main/java/com/google/api/codegen/util/Scanner.java 98.78% <0.00%> (-0.02%) 37.00% <0.00%> (ø%)
...a/com/google/api/codegen/util/MultiYamlReader.java 64.70% <0.00%> (ø) 5.00% <0.00%> (ø%)
...e/api/codegen/transformer/InitCodeTransformer.java 95.15% <0.00%> (+0.18%) 120.00% <0.00%> (+1.00%)
...om/google/api/codegen/config/ProtoMethodModel.java 89.55% <0.00%> (+1.31%) 35.00% <0.00%> (ø%)
...a/com/google/api/codegen/config/ProtoApiModel.java 94.73% <0.00%> (+2.42%) 18.00% <0.00%> (ø%)
...a/com/google/api/codegen/config/DiscoApiModel.java 79.31% <0.00%> (+2.64%) 9.00% <0.00%> (ø%)
...google/api/codegen/config/DiscoInterfaceModel.java 60.00% <0.00%> (+2.85%) 6.00% <0.00%> (ø%)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dc019bd...9481acd. Read the comment docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants