-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move shared testing code into core #822
Move shared testing code into core #822
Conversation
@@ -17,15 +17,14 @@ | |||
|
|||
namespace Google\Cloud\Tests\Unit\Spanner\Session; | |||
|
|||
require_once __DIR__ . '../../../Core/Lock/MockGlobals.php'; | |||
require_once __DIR__ . '/../../../../src/Core/Testing/Lock/MockGlobals.php'; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Note that in theory this change is non-breaking and can be merged/released without the remaining restructuring work |
src/Core/Testing/Functions.php
Outdated
* @experimental | ||
* @internal | ||
*/ | ||
class Functions |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
tests/snippets/Core/Iam/IamTest.php
Outdated
$this->iam->___setProperty('connection', $this->connection->reveal()); | ||
} | ||
|
||
public function testClass() | ||
{ | ||
$snippet = $this->snippetFromClass(Iam::class); | ||
$this->checkAndSkipTest([ | ||
'\Google\Cloud\PubSub\PubSubClient', |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some really nice changes in here. Great work!
Could we exclude Core\Testing
from out unit test coverage?
src/Core/Testing/Functions.php
Outdated
* @experimental | ||
* @internal | ||
*/ | ||
class Functions |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
tests/unit/Core/Fixtures.php
Outdated
return __DIR__ . '/fixtures/json-key-fixture.json'; | ||
} | ||
|
||
public static function SERVICE_FIXTURE() |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
tests/unit/Core/Fixtures.php
Outdated
@@ -0,0 +1,31 @@ | |||
<?php | |||
/** | |||
* Copyright 2017 Google Inc. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
tests/unit/Datastore/Fixtures.php
Outdated
@@ -0,0 +1,46 @@ | |||
<?php | |||
/** | |||
* Copyright 2017 Google Inc. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
tests/unit/Spanner/Fixtures.php
Outdated
@@ -0,0 +1,31 @@ | |||
<?php | |||
/** | |||
* Copyright 2017 Google Inc. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
tests/unit/Vision/Fixtures.php
Outdated
@@ -0,0 +1,31 @@ | |||
<?php | |||
/** | |||
* Copyright 2017 Google Inc. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Updated, PTAL |
@michaelbausor it looks like there are a few files that need |
Thanks - updated. |
This PR starts the process of migrating google-cloud-php to a new structure. The first step is to make sure that all shared code, in particular code for testing, is included in the google/cloud-core, so that a standalone repo can depend on google/cloud-core and be able to support its own tests.