File tree Expand file tree Collapse file tree 4 files changed +21
-18
lines changed Expand file tree Collapse file tree 4 files changed +21
-18
lines changed Original file line number Diff line number Diff line change 13
13
strategy :
14
14
matrix :
15
15
php-version : [7.2, 7.3, 7.4]
16
+ name : PHP ${{ matrix.php-version }} Conformance Test
16
17
steps :
17
18
- name : Checkout code
18
19
uses : actions/checkout@v2
Original file line number Diff line number Diff line change 11
11
matrix :
12
12
operating-system : [ubuntu-latest]
13
13
php-versions : ['7.2', '7.3', '7.4']
14
- name : PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
14
+ name : PHP ${{ matrix.php-versions }} Unit Test
15
15
steps :
16
16
- name : Checkout
17
17
uses : actions/checkout@v2
Original file line number Diff line number Diff line change 18
18
19
19
namespace Google \CloudFunctions ;
20
20
21
- class CloudEvent implements \JsonSerializable
21
+ use JsonSerializable ;
22
+
23
+ class CloudEvent implements JsonSerializable
22
24
{
23
25
// Required Fields
24
26
private $ id ;
Original file line number Diff line number Diff line change @@ -29,22 +29,22 @@ class CloudEventTest extends TestCase
29
29
public function testJsonSerialize ()
30
30
{
31
31
$ event = new CloudEvent (
32
- '1413058901901494 ' ,
33
- '//pubsub.googleapis.com/projects/MY-PROJECT/topics/MY-TOPIC ' ,
34
- '1.0 ' ,
35
- 'com.google.cloud.pubsub.topic.publish ' ,
36
- 'application/json ' ,
37
- 'type.googleapis.com/google.logging.v2.LogEntry ' ,
38
- 'My Subject ' ,
39
- '2020-12-08T20:03:19.162Z ' ,
40
- [
41
- "message " => [
42
- "data " => "SGVsbG8gdGhlcmU= " ,
43
- "messageId " => "1408577928008405 " ,
44
- "publishTime " => "2020-08-06T22:31:14.536Z "
45
- ],
46
- "subscription " => "projects/MY-PROJECT/subscriptions/MY-SUB "
47
- ]
32
+ '1413058901901494 ' ,
33
+ '//pubsub.googleapis.com/projects/MY-PROJECT/topics/MY-TOPIC ' ,
34
+ '1.0 ' ,
35
+ 'com.google.cloud.pubsub.topic.publish ' ,
36
+ 'application/json ' ,
37
+ 'type.googleapis.com/google.logging.v2.LogEntry ' ,
38
+ 'My Subject ' ,
39
+ '2020-12-08T20:03:19.162Z ' ,
40
+ [
41
+ "message " => [
42
+ "data " => "SGVsbG8gdGhlcmU= " ,
43
+ "messageId " => "1408577928008405 " ,
44
+ "publishTime " => "2020-08-06T22:31:14.536Z "
45
+ ],
46
+ "subscription " => "projects/MY-PROJECT/subscriptions/MY-SUB "
47
+ ]
48
48
);
49
49
50
50
$ want = '{
You can’t perform that action at this time.
0 commit comments