diff options
Diffstat (limited to 'src/php')
4 files changed, 12 insertions, 4 deletions
diff --git a/src/php/lib/Grpc/BaseStub.php b/src/php/lib/Grpc/BaseStub.php index 0a3e1f78bf..d4fb3ba17e 100755 --- a/src/php/lib/Grpc/BaseStub.php +++ b/src/php/lib/Grpc/BaseStub.php @@ -123,7 +123,7 @@ class BaseStub { * Close the communication channel associated with this stub */ public function close() { - $channel->close(); + $this->channel->close(); } /** diff --git a/src/php/tests/generated_code/AbstractGeneratedCodeTest.php b/src/php/tests/generated_code/AbstractGeneratedCodeTest.php index 5cdba1e5a0..940635389b 100644 --- a/src/php/tests/generated_code/AbstractGeneratedCodeTest.php +++ b/src/php/tests/generated_code/AbstractGeneratedCodeTest.php @@ -32,7 +32,7 @@ * */ require_once realpath(dirname(__FILE__) . '/../../vendor/autoload.php'); -require 'math.php'; +require_once dirname(__FILE__) . '/math.php'; abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase { /* These tests require that a server exporting the math service must be * running on $GRPC_TEST_HOST */ diff --git a/src/php/tests/generated_code/GeneratedCodeTest.php b/src/php/tests/generated_code/GeneratedCodeTest.php index a1a2ce81db..e5600dc6a5 100755 --- a/src/php/tests/generated_code/GeneratedCodeTest.php +++ b/src/php/tests/generated_code/GeneratedCodeTest.php @@ -31,11 +31,15 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -require 'AbstractGeneratedCodeTest.php'; +require_once dirname(__FILE__) . '/AbstractGeneratedCodeTest.php'; class GeneratedCodeTest extends AbstractGeneratedCodeTest { public static function setUpBeforeClass() { self::$client = new math\MathClient( getenv('GRPC_TEST_HOST'), []); } + + public static function tearDownAfterClass() { + self::$client->close(); + } } diff --git a/src/php/tests/generated_code/GeneratedCodeWithCallbackTest.php b/src/php/tests/generated_code/GeneratedCodeWithCallbackTest.php index 68f57d34ad..902eeb41e6 100644 --- a/src/php/tests/generated_code/GeneratedCodeWithCallbackTest.php +++ b/src/php/tests/generated_code/GeneratedCodeWithCallbackTest.php @@ -31,7 +31,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -require 'AbstractGeneratedCodeTest.php'; +require_once dirname(__FILE__) . '/AbstractGeneratedCodeTest.php'; class GeneratedCodeWithCallbackTest extends AbstractGeneratedCodeTest { public static function setUpBeforeClass() { @@ -44,4 +44,8 @@ class GeneratedCodeWithCallbackTest extends AbstractGeneratedCodeTest { return $a_copy; }]); } + + public static function tearDownAfterClass() { + self::$client->close(); + } } |