Skip to content
This repository was archived by the owner on Oct 19, 2023. It is now read-only.

Commit 9abd7f7

Browse files
author
Takashi Matsuo
committed
Added an end to end test for grpc extension.
1 parent efeb7c6 commit 9abd7f7

11 files changed

Lines changed: 11388 additions & 5 deletions

File tree

‎e2e/EndToEndTest.php‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,11 @@ public function testSession()
146146
'session.php status code');
147147
$this->assertEquals('1', $body = $resp->getBody()->getContents());
148148
}
149+
150+
public function testGrpcPubsub()
151+
{
152+
$resp = $this->client->get('grpc_pubsub.php');
153+
$this->assertEquals('200', $resp->getStatusCode(),
154+
'grpc_pubsub.php status code');
155+
}
149156
}

‎scripts/run_test_suite.sh‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ set -ex
2020

2121
# Run php-cs-fixer.
2222
# We want to fail fast for coding standard violations.
23-
php-cs-fixer fix --dry-run --diff --level=psr2 --fixers=concat_with_spaces .
23+
php-cs-fixer fix --dry-run --diff --level=psr2 \
24+
--fixers=concat_with_spaces,unused_use,trailing_spaces,indentation .
25+
2426

2527
# Then build images.
2628
scripts/build_images.sh
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
3-
"silex/silex": "^1.3",
4-
"php": "^5.6"
3+
"php": "^5.6",
4+
"silex/silex": "^1.3"
55
}
66
}

‎testapps/php56_e2e/composer.json‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
{
2+
"repositories": [
3+
{
4+
"type": "vcs",
5+
"url": "https://github.com/stanley-cheung/Protobuf-PHP"
6+
}
7+
],
28
"require": {
3-
"silex/silex": "^1.3",
4-
"php": "^5.6"
9+
"php": "^5.6",
10+
"datto/protobuf-php": "dev-master",
11+
"google/auth": "dev-master",
12+
"grpc/grpc": "dev-release-0_13",
13+
"silex/silex": "^1.3"
14+
},
15+
"autoload": {
16+
"classmap": ["web"]
517
}
618
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
3+
// Source: google/api/annotations.proto
4+
// Date: 2016-03-02 22:35:01
5+
6+
namespace {
7+
\google\protobuf\MethodOptions::extension(function () {
8+
// OPTIONAL MESSAGE google\api\http = 72295728
9+
$f = new \DrSlump\Protobuf\Field();
10+
$f->number = 72295728;
11+
$f->name = "google\api\http";
12+
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
13+
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
14+
$f->reference = '\google\api\HttpRule';
15+
return $f;
16+
});
17+
}

0 commit comments

Comments
 (0)