File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
functions/tips_scopes/test Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,12 @@ class DeployTest extends TestCase
34
34
{
35
35
use CloudFunctionDeploymentTrait;
36
36
37
- private static $ name = 'scopeDemo ' ;
37
+ private static $ entryPoint = 'scopeDemo ' ;
38
38
39
39
public function testFunction () : void
40
40
{
41
41
// Send a request to the function.
42
- $ resp = $ this ->client ->get ('' , [
42
+ $ resp = $ this ->client ->post ('' , [
43
43
// Uncomment and CURLOPT_VERBOSE debug content will be sent to stdout.
44
44
// 'debug' => true
45
45
]);
Original file line number Diff line number Diff line change @@ -28,12 +28,12 @@ class SystemTest extends TestCase
28
28
{
29
29
use CloudFunctionLocalTestTrait;
30
30
31
- private static $ name = 'scopeDemo ' ;
31
+ private static $ entryPoint = 'scopeDemo ' ;
32
32
33
33
public function testFunction () : void
34
34
{
35
35
// Send a request to the function.
36
- $ resp = $ this ->client ->get ('/ ' );
36
+ $ resp = $ this ->client ->post ('/ ' );
37
37
38
38
// Assert status code.
39
39
$ this ->assertEquals ('200 ' , $ resp ->getStatusCode ());
Original file line number Diff line number Diff line change 26
26
*/
27
27
class UnitTest extends TestCase
28
28
{
29
- private static $ name = 'scopeDemo ' ;
29
+ private static $ entryPoint = 'scopeDemo ' ;
30
30
31
31
public static function setUpBeforeClass () : void
32
32
{
@@ -35,8 +35,8 @@ public static function setUpBeforeClass() : void
35
35
36
36
public function testFunction () : void
37
37
{
38
- $ request = new ServerRequest ('GET ' , '/ ' );
39
- $ output = $ this ->runFunction (self ::$ name , [$ request ]);
38
+ $ request = new ServerRequest ('POST ' , '/ ' );
39
+ $ output = $ this ->runFunction (self ::$ entryPoint , [$ request ]);
40
40
$ this ->assertContains ('Per instance: 120 ' , $ output );
41
41
$ this ->assertContains ('Per function: 15 ' , $ output );
42
42
}
You can’t perform that action at this time.
0 commit comments