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
3434{
3535 use CloudFunctionDeploymentTrait;
3636
37- private static $ name = 'scopeDemo ' ;
37+ private static $ entryPoint = 'scopeDemo ' ;
3838
3939 public function testFunction () : void
4040 {
4141 // Send a request to the function.
42- $ resp = $ this ->client ->get ('' , [
42+ $ resp = $ this ->client ->post ('' , [
4343 // Uncomment and CURLOPT_VERBOSE debug content will be sent to stdout.
4444 // 'debug' => true
4545 ]);
Original file line number Diff line number Diff line change @@ -28,12 +28,12 @@ class SystemTest extends TestCase
2828{
2929 use CloudFunctionLocalTestTrait;
3030
31- private static $ name = 'scopeDemo ' ;
31+ private static $ entryPoint = 'scopeDemo ' ;
3232
3333 public function testFunction () : void
3434 {
3535 // Send a request to the function.
36- $ resp = $ this ->client ->get ('/ ' );
36+ $ resp = $ this ->client ->post ('/ ' );
3737
3838 // Assert status code.
3939 $ this ->assertEquals ('200 ' , $ resp ->getStatusCode ());
Original file line number Diff line number Diff line change 2626 */
2727class UnitTest extends TestCase
2828{
29- private static $ name = 'scopeDemo ' ;
29+ private static $ entryPoint = 'scopeDemo ' ;
3030
3131 public static function setUpBeforeClass () : void
3232 {
@@ -35,8 +35,8 @@ public static function setUpBeforeClass() : void
3535
3636 public function testFunction () : void
3737 {
38- $ request = new ServerRequest ('GET ' , '/ ' );
39- $ output = $ this ->runFunction (self ::$ name , [$ request ]);
38+ $ request = new ServerRequest ('POST ' , '/ ' );
39+ $ output = $ this ->runFunction (self ::$ entryPoint , [$ request ]);
4040 $ this ->assertContains ('Per instance: 120 ' , $ output );
4141 $ this ->assertContains ('Per function: 15 ' , $ output );
4242 }
You can’t perform that action at this time.
0 commit comments