Skip to content

Commit 33654dc

Browse files
authored
Standardize all tests to use one phpunit and google/cloud-tools (GoogleCloudPlatform#918)
1 parent 73439cc commit 33654dc

File tree

317 files changed

+612
-1869
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

317 files changed

+612
-1869
lines changed

.kokoro/docker/php73/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ RUN apt-get update && \
3232
zip \
3333
zlib1g-dev
3434

35-
RUN wget -nv -O phpunit.phar https://phar.phpunit.de/phpunit-7.phar && \
36-
chmod +x phpunit.phar && \
37-
mv phpunit.phar /usr/local/bin/phpunit && \
38-
ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a && \
35+
RUN ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a && \
3936
mkdir ${PHP_DIR} ${PHP_SRC_DIR} && \
4037
cd ${PHP_SRC_DIR} && \
4138
wget http://us1.php.net/get/php-7.3.0.tar.bz2/from/this/mirror \
@@ -110,7 +107,7 @@ RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz \
110107
--command-completion false
111108

112109
# Make composer and gcloud bins available via the PATH variable
113-
ENV PATH="$PATH:/opt/composer/vendor/bin:/root/google-cloud-sdk/bin"
110+
ENV PATH="$PATH:/root/google-cloud-sdk/bin:/root/.composer/vendor/bin"
114111

115112
# Configure Google Cloud SDK
116113
RUN gcloud config set app/promote_by_default false && \

.kokoro/system_tests.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,8 @@ if [ "${RUN_CS_CHECK}" = "true" ]; then
5555
bash testing/run_cs_check.sh
5656
fi
5757

58+
# Install global test dependencies
59+
bash testing/composer.sh
60+
5861
# Run tests
5962
bash testing/run_test_suite.sh

appengine/flexible/analytics/composer.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,5 @@
44
"twig/twig": "^1.24",
55
"guzzlehttp/guzzle": "^6.3",
66
"symfony/css-selector": "^3.1"
7-
},
8-
"require-dev": {
9-
"google/cloud-tools": "^0.6"
107
}
118
}

appengine/flexible/analytics/phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
-->
17-
<phpunit bootstrap="test/bootstrap.php" colors="true">
17+
<phpunit bootstrap="../../../testing/bootstrap.php" colors="true">
1818
<php>
1919
<env name="GA_TRACKING_ID" value="UA-78971600-1"/>
2020
php>

appengine/flexible/analytics/test/DeployTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
namespace Google\Cloud\Samples\AppEngine\Analytics;
1818

1919
use Google\Cloud\TestUtils\AppEngineDeploymentTrait;
20+
use PHPUnit\Framework\TestCase;
2021

21-
class DeployTest extends \PHPUnit_Framework_TestCase
22+
class DeployTest extends TestCase
2223
{
2324
use AppEngineDeploymentTrait;
2425

appengine/flexible/analytics/test/bootstrap.php

Lines changed: 0 additions & 21 deletions
This file was deleted.

appengine/flexible/cloudsql-mysql/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"google/apiclient": "^2.0"
55
},
66
"require-dev": {
7-
"google/cloud-tools": "^0.6",
87
"paragonie/random_compat": "^2.0"
98
}
109
}

appengine/flexible/cloudsql-mysql/phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
-->
17-
<phpunit bootstrap="./test/bootstrap.php" colors="true">
17+
<phpunit bootstrap="../../../testing/bootstrap.php" colors="true">
1818
<testsuites>
1919
<testsuite>
2020
<directory>testdirectory>

appengine/flexible/cloudsql-mysql/test/DeployTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818

1919
use Google\Cloud\TestUtils\AppEngineDeploymentTrait;
2020
use Google\Cloud\TestUtils\FileUtil;
21+
use PHPUnit\Framework\TestCase;
2122
use Symfony\Component\Yaml\Yaml;
2223

23-
class DeployTest extends \PHPUnit_Framework_TestCase
24+
class DeployTest extends TestCase
2425
{
2526
use AppEngineDeploymentTrait;
2627

appengine/flexible/cloudsql-mysql/test/bootstrap.php

Lines changed: 0 additions & 22 deletions
This file was deleted.

appengine/flexible/cloudsql-postgres/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"google/apiclient": "^2.0"
55
},
66
"require-dev": {
7-
"google/cloud-tools": "^0.6",
87
"paragonie/random_compat": "^2.0"
98
}
109
}

appengine/flexible/cloudsql-postgres/phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
-->
17-
<phpunit bootstrap="./test/bootstrap.php" colors="true">
17+
<phpunit bootstrap="../../../testing/bootstrap.php" colors="true">
1818
<testsuites>
1919
<testsuite>
2020
<directory>testdirectory>

appengine/flexible/cloudsql-postgres/test/DeployTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818

1919
use Google\Cloud\TestUtils\AppEngineDeploymentTrait;
2020
use Google\Cloud\TestUtils\FileUtil;
21+
use PHPUnit\Framework\TestCase;
2122
use Symfony\Component\Yaml\Yaml;
2223

23-
class DeployTest extends \PHPUnit_Framework_TestCase
24+
class DeployTest extends TestCase
2425
{
2526
use AppEngineDeploymentTrait;
2627

appengine/flexible/cloudsql-postgres/test/bootstrap.php

Lines changed: 0 additions & 22 deletions
This file was deleted.

appengine/flexible/datastore/composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"google/cloud-datastore": "^1.0"
55
},
66
"require-dev": {
7-
"guzzlehttp/guzzle": "^6.3",
8-
"google/cloud-tools": "^0.6"
7+
"guzzlehttp/guzzle": "^6.3"
98
}
109
}

appengine/flexible/datastore/phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
-->
17-
<phpunit bootstrap="test/bootstrap.php" colors="true">
17+
<phpunit bootstrap="../../../testing/bootstrap.php" colors="true">
1818
<testsuites>
1919
<testsuite>
2020
<directory>testdirectory>

appengine/flexible/datastore/test/bootstrap.php

Lines changed: 0 additions & 21 deletions
This file was deleted.

appengine/flexible/drupal8/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
},
55
"require-dev": {
66
"guzzlehttp/guzzle": "^6.3",
7-
"google/cloud-tools": "^0.6",
87
"monolog/monolog": "^1.19",
98
"symfony/console": " ^2.7",
109
"symfony/process": "^3.0",

appengine/flexible/drupal8/phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
-->
17-
<phpunit bootstrap="test/bootstrap.php">
17+
<phpunit bootstrap="../../../testing/bootstrap.php">
1818
<testsuites>
1919
<testsuite name="Drupal deployment test">
2020
<directory>testdirectory>

appengine/flexible/drupal8/test/bootstrap.php

Lines changed: 0 additions & 19 deletions
This file was deleted.

appengine/flexible/laravel/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"symfony\/process": "~2.8|~3.0",
55
"monolog\/monolog": "^1.19",
66
"guzzlehttp\/guzzle": "^6.2",
7-
"google/cloud-tools": "^0.6",
87
"paragonie/random_compat": " ^2.0"
98
}
109
}

appengine/flexible/laravel/phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
-->
17-
<phpunit bootstrap="test/bootstrap.php">
17+
<phpunit bootstrap="../../../testing/bootstrap.php">
1818
<testsuites>
1919
<testsuite name="Laravel deployment test">
2020
<directory>testdirectory>

appengine/flexible/laravel/test/bootstrap.php

Lines changed: 0 additions & 19 deletions
This file was deleted.

appengine/flexible/logging/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"twig/twig": "^1.29"
77
},
88
"require-dev": {
9-
"google/cloud-tools": "^0.6",
109
"guzzlehttp/guzzle": "^6.3",
1110
"symfony/browser-kit": "^3.2"
1211
}

appengine/flexible/logging/phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
-->
17-
<phpunit bootstrap="test/bootstrap.php">
17+
<phpunit bootstrap="../../../testing/bootstrap.php">
1818
<testsuites>
1919
<testsuite name="AppEngine Flex logging test">
2020
<directory>testdirectory>

appengine/flexible/logging/test/bootstrap.php

Lines changed: 0 additions & 21 deletions
This file was deleted.

appengine/flexible/mailgun/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"symfony/yaml": "^3.1"
77
},
88
"require-dev": {
9-
"google/cloud-tools": "^0.6",
109
"paragonie/random_compat": "^2.0",
1110
"symfony/browser-kit": "^3.0"
1211
}

appengine/flexible/mailgun/phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
-->
17-
<phpunit bootstrap="test/bootstrap.php">
17+
<phpunit bootstrap="../../../testing/bootstrap.php">
1818
<testsuites>
1919
<testsuite name="PHP AppEngine Flexible Mailgun test">
2020
<directory>testdirectory>

appengine/flexible/mailgun/test/DeployTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818

1919
use Google\Cloud\TestUtils\AppEngineDeploymentTrait;
2020
use Google\Cloud\TestUtils\FileUtil;
21+
use PHPUnit\Framework\TestCase;
2122

22-
class DeployTest extends \PHPUnit_Framework_TestCase
23+
class DeployTest extends TestCase
2324
{
2425
use AppEngineDeploymentTrait;
2526

appengine/flexible/mailgun/test/bootstrap.php

Lines changed: 0 additions & 22 deletions
This file was deleted.

appengine/flexible/mailjet/composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
},
77
"require-dev": {
88
"symfony/browser-kit": "^3.0",
9-
"paragonie/random_compat": "^2.0",
10-
"google/cloud-tools": "^0.6"
9+
"paragonie/random_compat": "^2.0"
1110
}
1211
}

0 commit comments

Comments
 (0)