Skip to content

Commit c3917ce

Browse files
committed
code cleanup; assertion improved.
1 parent 809bed7 commit c3917ce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/SimpleTestCase.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
namespace Quickstart\Test;
33

44
use CloudEvents\V1\CloudEventImmutable;
5-
use GuzzleHttp\Psr7\Response;
65
use GuzzleHttp\Psr7\ServerRequest;
76
use Quickstart\CloudFunctions;
8-
use Google\CloudFunctions\CloudEvent;
97
use PHPUnit\Framework\TestCase;
108

119
/**
12-
* Class SimpleTestCase.
10+
* Class Simple TestCase.
11+
* It depends on the <code>gcloud</code> command to obtain the project ID.
1312
*
1413
* @author Martin Zeitler
1514
* @version 1.0.0
@@ -37,7 +36,8 @@ public function test_on_https(): void {
3736
$payload = json_encode(['data' => uniqid()]);
3837
$request = new ServerRequest('POST', '/', [], $payload);
3938
$response = CloudFunctions::on_https( $request );
40-
$this->assertTrue($response instanceof Response);
39+
$this->assertTrue($response->getReasonPhrase().equals("OK"));
40+
$this->assertTrue($response->getStatusCode() == 200);
4141
}
4242

4343
public function test_on_pubsub(): void {

0 commit comments

Comments
 (0)