Skip to content
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

Merged
merged 43 commits into from
Jan 31, 2018

Conversation

michaelbausor
Copy link
Contributor

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.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 28, 2017
@@ -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.

@michaelbausor
Copy link
Contributor Author

Note that in theory this change is non-breaking and can be merged/released without the remaining restructuring work

@michaelbausor michaelbausor changed the title WIP: Move shared testing code into core Move shared testing code into core Jan 11, 2018
* @experimental
* @internal
*/
class Functions

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

$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.

This comment was marked as spam.

This comment was marked as spam.

Copy link
Contributor

@dwsupplee dwsupplee left a 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?

* @experimental
* @internal
*/
class Functions

This comment was marked as spam.

return __DIR__ . '/fixtures/json-key-fixture.json';
}

public static function SERVICE_FIXTURE()

This comment was marked as spam.

@@ -0,0 +1,31 @@
<?php
/**
* Copyright 2017 Google Inc.

This comment was marked as spam.

@@ -0,0 +1,46 @@
<?php
/**
* Copyright 2017 Google Inc.

This comment was marked as spam.

@@ -0,0 +1,31 @@
<?php
/**
* Copyright 2017 Google Inc.

This comment was marked as spam.

@@ -0,0 +1,31 @@
<?php
/**
* Copyright 2017 Google Inc.

This comment was marked as spam.

@michaelbausor
Copy link
Contributor Author

Updated, PTAL

@dwsupplee
Copy link
Contributor

@michaelbausor it looks like there are a few files that need Functions to be updated to TestHelpers.

@michaelbausor
Copy link
Contributor Author

Thanks - updated.

@dwsupplee dwsupplee merged commit b84cfd6 into googleapis:master Jan 31, 2018
@jdpedrie jdpedrie mentioned this pull request Feb 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants