Skip to content
Snippets Groups Projects
Commit 42e2beb8 authored by Stanley Cheung's avatar Stanley Cheung
Browse files

Merge pull request #3858 from enisoc/php-close

PHP: Fix property reference in BaseStub::close()
parents 70815ae7 04e1eb84
No related branches found
No related tags found
No related merge requests found
......@@ -123,7 +123,7 @@ class BaseStub {
* Close the communication channel associated with this stub
*/
public function close() {
$channel->close();
$this->channel->close();
}
/**
......
......@@ -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 */
......
......@@ -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();
}
}
......@@ -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();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment