Skip to content

Commit 9a32d33

Browse files
committed
Enable endpoint discovery tests for php
1 parent f87f4dd commit 9a32d33

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

manifests/php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ tests/:
2323
Test_API_Security_Custom_Data_Classification_Processor_Override: missing_feature
2424
Test_API_Security_Custom_Data_Classification_Scanner: missing_feature
2525
test_endpoint_discovery.py:
26-
Test_Endpoint_Discovery: missing_feature
26+
Test_Endpoint_Discovery: v0.94.0
2727
test_schemas.py:
2828
Test_Scanners:
2929
'*': v1.11.0-dev

tests/appsec/api_security/test_endpoint_discovery.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def setup_optional_type(self):
8080
self.main_setup()
8181

8282
@irrelevant(
83-
context.library in ["python"],
83+
context.library in ["python", "php"],
8484
reason="Not supported",
8585
)
8686
def test_optional_type(self):
@@ -124,7 +124,7 @@ def setup_optional_request_body_type(self):
124124
self.main_setup()
125125

126126
@irrelevant(
127-
context.library in ["dotnet", "nodejs", "python", "ruby"],
127+
context.library in ["dotnet", "nodejs", "python", "ruby", "php"],
128128
reason="Not supported",
129129
)
130130
@missing_feature(context.library == "java" and context.weblog_variant in ["spring-boot"])
@@ -146,7 +146,7 @@ def setup_optional_response_body_type(self):
146146
(context.library == "python" and context.weblog_variant != "fastapi"),
147147
reason="Not applicable to weblog variant",
148148
)
149-
@irrelevant(context.library in ["dotnet", "nodejs", "ruby"], reason="Not supported")
149+
@irrelevant(context.library in ["dotnet", "nodejs", "ruby", "php"], reason="Not supported")
150150
def test_optional_response_body_type(self):
151151
endpoints = self._get_endpoints()
152152
found = False
@@ -172,7 +172,7 @@ def setup_optional_response_code(self):
172172
(context.library == "python" and context.weblog_variant != "fastapi"),
173173
reason="Not applicable to weblog variant",
174174
)
175-
@irrelevant(context.library in ["dotnet", "nodejs", "ruby"], reason="Not supported")
175+
@irrelevant(context.library in ["dotnet", "nodejs", "ruby", "php"], reason="Not supported")
176176
def test_optional_response_code(self):
177177
endpoints = self._get_endpoints()
178178
found = False
@@ -193,7 +193,7 @@ def setup_optional_authentication(self):
193193
reason="Not applicable to weblog variant",
194194
)
195195
@irrelevant(
196-
context.library in ["dotnet", "nodejs", "python", "ruby"],
196+
context.library in ["dotnet", "nodejs", "python", "ruby", "php"],
197197
reason="Not supported",
198198
)
199199
def test_optional_authentication(self):
@@ -212,7 +212,7 @@ def setup_optional_metadata(self):
212212
self.main_setup()
213213

214214
@irrelevant(
215-
context.library in ["python", "dotnet", "nodejs", "ruby"],
215+
context.library in ["python", "dotnet", "nodejs", "ruby", "php"],
216216
reason="Not supported",
217217
)
218218
def test_optional_metadata(self):

utils/build/docker/php/common/index.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@
77
\datadog\appsec\track_authenticated_user_event_automated($user);
88
}
99

10+
11+
\DDTrace\add_endpoint('/', 'http.request', 'GET /', 'GET');
12+
\DDTrace\add_endpoint('/another', 'http.request', 'GET /another', 'GET');
13+
1014
phpinfo();

0 commit comments

Comments
 (0)