22
33namespace Bref \Test ;
44
5+ use Bref \ConsoleRuntime \Main as ConsoleMain ;
6+ use Bref \FpmRuntime \Main as FpmMain ;
7+ use Bref \FunctionRuntime \Main as FunctionMain ;
58use PHPUnit \Framework \TestCase ;
69use Symfony \Component \Process \Process ;
710use Symfony \Component \Yaml \Yaml ;
@@ -12,23 +15,23 @@ public function test the plugin adds the layers(): void
1215 {
1316 $ output = $ this ->slsPrint ('serverless.yml ' );
1417
15- self ::assertFunction ($ output ['functions ' ]['function ' ], \ Bref \ FunctionRuntime \Main ::class, [
18+ self ::assertFunction ($ output ['functions ' ]['function ' ], FunctionMain ::class, [
1619 'arn:aws:lambda:us-east-1:873528684822:layer:php-83: ' ,
1720 ]);
18- self ::assertFunction ($ output ['functions ' ]['fpm ' ], \ Bref \ FpmRuntime \Main ::class, [
21+ self ::assertFunction ($ output ['functions ' ]['fpm ' ], FpmMain ::class, [
1922 'arn:aws:lambda:us-east-1:873528684822:layer:php-83: ' ,
2023 ]);
21- self ::assertFunction ($ output ['functions ' ]['console ' ], \ Bref \ ConsoleRuntime \Main ::class, [
24+ self ::assertFunction ($ output ['functions ' ]['console ' ], ConsoleMain ::class, [
2225 'arn:aws:lambda:us-east-1:873528684822:layer:php-83: ' ,
2326 ]);
2427
25- self ::assertFunction ($ output ['functions ' ]['function-arm ' ], \ Bref \ FunctionRuntime \Main ::class, [
28+ self ::assertFunction ($ output ['functions ' ]['function-arm ' ], FunctionMain ::class, [
2629 'arn:aws:lambda:us-east-1:873528684822:layer:arm-php-83: ' ,
2730 ]);
28- self ::assertFunction ($ output ['functions ' ]['fpm-arm ' ], \ Bref \ FpmRuntime \Main ::class, [
31+ self ::assertFunction ($ output ['functions ' ]['fpm-arm ' ], FpmMain ::class, [
2932 'arn:aws:lambda:us-east-1:873528684822:layer:arm-php-83: ' ,
3033 ]);
31- self ::assertFunction ($ output ['functions ' ]['console-arm ' ], \ Bref \ ConsoleRuntime \Main ::class, [
34+ self ::assertFunction ($ output ['functions ' ]['console-arm ' ], ConsoleMain ::class, [
3235 'arn:aws:lambda:us-east-1:873528684822:layer:arm-php-83: ' ,
3336 ]);
3437 }
@@ -37,10 +40,10 @@ public function test the plugin adds the layers when the runtime is se
3740 {
3841 $ output = $ this ->slsPrint ('serverless-runtime-root.yml ' );
3942
40- self ::assertFunction ($ output ['functions ' ]['function ' ], \ Bref \ FunctionRuntime \Main ::class, [
43+ self ::assertFunction ($ output ['functions ' ]['function ' ], FunctionMain ::class, [
4144 'arn:aws:lambda:us-east-1:873528684822:layer:php-83: ' ,
4245 ]);
43- self ::assertFunction ($ output ['functions ' ]['function-arm ' ], \ Bref \ FunctionRuntime \Main ::class, [
46+ self ::assertFunction ($ output ['functions ' ]['function-arm ' ], FunctionMain ::class, [
4447 'arn:aws:lambda:us-east-1:873528684822:layer:arm-php-83: ' ,
4548 ]);
4649 }
@@ -49,21 +52,21 @@ public function test the plugin doesnt break layers added separately(): v
4952 {
5053 $ output = $ this ->slsPrint ('serverless-with-layers.yml ' );
5154
52- self ::assertFunction ($ output ['functions ' ]['function ' ], \ Bref \ FunctionRuntime \Main ::class, [
55+ self ::assertFunction ($ output ['functions ' ]['function ' ], FunctionMain ::class, [
5356 'arn:aws:lambda:us-east-1:873528684822:layer:php-83: ' ,
5457 'arn:aws:lambda:us-east-1:1234567890:layer:foo:1 ' ,
5558 ]);
56- self ::assertFunction ($ output ['functions ' ]['function-arm ' ], \ Bref \ FunctionRuntime \Main ::class, [
59+ self ::assertFunction ($ output ['functions ' ]['function-arm ' ], FunctionMain ::class, [
5760 'arn:aws:lambda:us-east-1:873528684822:layer:arm-php-83: ' ,
5861 'arn:aws:lambda:us-east-1:1234567890:layer:foo:1 ' ,
5962 ]);
60- self ::assertFunction ($ output ['functions ' ]['function-with-layers ' ], \ Bref \ FunctionRuntime \Main ::class, [
63+ self ::assertFunction ($ output ['functions ' ]['function-with-layers ' ], FunctionMain ::class, [
6164 'arn:aws:lambda:us-east-1:873528684822:layer:php-83: ' ,
6265 // This function doesn't have the `foo` layer because that's how SF works:
6366 // layers in the function completely override the layers in the root
6467 'arn:aws:lambda:us-east-1:1234567890:layer:bar:1 ' ,
6568 ]);
66- self ::assertFunction ($ output ['functions ' ]['function-arm-with-layers ' ], \ Bref \ FunctionRuntime \Main ::class, [
69+ self ::assertFunction ($ output ['functions ' ]['function-arm-with-layers ' ], FunctionMain ::class, [
6770 'arn:aws:lambda:us-east-1:873528684822:layer:arm-php-83: ' ,
6871 // This function doesn't have the `foo` layer because that's how SF works:
6972 // layers in the function completely override the layers in the root
@@ -75,21 +78,21 @@ public function test the plugin doesnt break layers added separately wit
7578 {
7679 $ output = $ this ->slsPrint ('serverless-runtime-root-with-layers.yml ' );
7780
78- self ::assertFunction ($ output ['functions ' ]['function ' ], \ Bref \ FunctionRuntime \Main ::class, [
81+ self ::assertFunction ($ output ['functions ' ]['function ' ], FunctionMain ::class, [
7982 'arn:aws:lambda:us-east-1:873528684822:layer:php-83: ' ,
8083 'arn:aws:lambda:us-east-1:1234567890:layer:foo:1 ' ,
8184 ]);
82- self ::assertFunction ($ output ['functions ' ]['function-arm ' ], \ Bref \ FunctionRuntime \Main ::class, [
85+ self ::assertFunction ($ output ['functions ' ]['function-arm ' ], FunctionMain ::class, [
8386 'arn:aws:lambda:us-east-1:873528684822:layer:arm-php-83: ' ,
8487 'arn:aws:lambda:us-east-1:1234567890:layer:foo:1 ' ,
8588 ]);
86- self ::assertFunction ($ output ['functions ' ]['function-with-layers ' ], \ Bref \ FunctionRuntime \Main ::class, [
89+ self ::assertFunction ($ output ['functions ' ]['function-with-layers ' ], FunctionMain ::class, [
8790 'arn:aws:lambda:us-east-1:873528684822:layer:php-83: ' ,
8891 // This function doesn't have the `foo` layer because that's how SF works:
8992 // layers in the function completely override the layers in the root
9093 'arn:aws:lambda:us-east-1:1234567890:layer:bar:1 ' ,
9194 ]);
92- self ::assertFunction ($ output ['functions ' ]['function-arm-with-layers ' ], \ Bref \ FunctionRuntime \Main ::class, [
95+ self ::assertFunction ($ output ['functions ' ]['function-arm-with-layers ' ], FunctionMain ::class, [
9396 'arn:aws:lambda:us-east-1:873528684822:layer:arm-php-83: ' ,
9497 // This function doesn't have the `foo` layer because that's how SF works:
9598 // layers in the function completely override the layers in the root
0 commit comments