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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/main/resources/com/google/api/codegen/php/test.snip
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
*/
private function createCredentials()
{
return $this->getMockBuilder(CredentialsWrapper::class)
->disableOriginalConstructor()
->getMock();
return $this->prophesize(CredentialsWrapper::class)->reveal();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5929,9 +5929,7 @@ class LibraryServiceClientTest extends GeneratedTest
*/
private function createCredentials()
{
return $this->getMockBuilder(CredentialsWrapper::class)
->disableOriginalConstructor()
->getMock();
return $this->prophesize(CredentialsWrapper::class)->reveal();
}

/**
Expand Down Expand Up @@ -8868,9 +8866,7 @@ class MyProtoClientTest extends GeneratedTest
*/
private function createCredentials()
{
return $this->getMockBuilder(CredentialsWrapper::class)
->disableOriginalConstructor()
->getMock();
return $this->prophesize(CredentialsWrapper::class)->reveal();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -755,9 +755,7 @@ class OperationsClientTest extends GeneratedTest
*/
private function createCredentials()
{
return $this->getMockBuilder(CredentialsWrapper::class)
->disableOriginalConstructor()
->getMock();
return $this->prophesize(CredentialsWrapper::class)->reveal();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,7 @@ class NoTemplatesApiServiceClientTest extends GeneratedTest
*/
private function createCredentials()
{
return $this->getMockBuilder(CredentialsWrapper::class)
->disableOriginalConstructor()
->getMock();
return $this->prophesize(CredentialsWrapper::class)->reveal();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6958,9 +6958,7 @@ class LibraryServiceClientTest extends GeneratedTest
*/
private function createCredentials()
{
return $this->getMockBuilder(CredentialsWrapper::class)
->disableOriginalConstructor()
->getMock();
return $this->prophesize(CredentialsWrapper::class)->reveal();
}

/**
Expand Down Expand Up @@ -10254,9 +10252,7 @@ class MyProtoClientTest extends GeneratedTest
*/
private function createCredentials()
{
return $this->getMockBuilder(CredentialsWrapper::class)
->disableOriginalConstructor()
->getMock();
return $this->prophesize(CredentialsWrapper::class)->reveal();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6983,9 +6983,7 @@ class LibraryServiceClientTest extends GeneratedTest
*/
private function createCredentials()
{
return $this->getMockBuilder(CredentialsWrapper::class)
->disableOriginalConstructor()
->getMock();
return $this->prophesize(CredentialsWrapper::class)->reveal();
}

/**
Expand Down Expand Up @@ -10279,9 +10277,7 @@ class MyProtoClientTest extends GeneratedTest
*/
private function createCredentials()
{
return $this->getMockBuilder(CredentialsWrapper::class)
->disableOriginalConstructor()
->getMock();
return $this->prophesize(CredentialsWrapper::class)->reveal();
}

/**
Expand Down