Skip to content

Commit ab0fdb4

Browse files
committed
Fixed Yaml test + added tests to skip
1 parent 78badb4 commit ab0fdb4

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Diff for: util/ActionTest.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ private function do(array $actions): string
9999
];
100100
foreach ($actions as $key => $value) {
101101
if (method_exists($this, $key)) {
102-
$this->$key($value, $vars);
102+
if (!empty($value)) {
103+
$this->$key($value, $vars);
104+
}
103105
} else {
104106
// headers
105107
if (!empty($this->headers)) {

Diff for: util/YamlTests.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,19 @@ class YamlTests
5252
'Cat\Templates\_10_BasicTest::FilteredTemplates' => 'regex mismatch',
5353
'Cat\Templates\_10_BasicTest::SelectColumns' => 'regex mismatch',
5454
'FieldCaps\_50_Fieldtype_FilterTest::*' => 'Bool mismatch',
55+
'Indices\Create\_20_Synthetic_SourceTest::*' => 'Malformed request',
5556
'Indices\GetAlias\_10_BasicTest::GetAliasAgainstClosedIndices' => 'Failed asserting that true is false',
5657
'Indices\GetIndexTemplate\_10_BasicTest::*' => 'Bool mismatch',
5758
'Indices\PutTemplate\_10_BasicTest::PutTemplateCreate' => 'index_template [test] already exists',
5859
'Indices\Refresh\_10_BasicTest::IndicesRefreshTestEmptyArray' => 'empty array?',
5960
'Indices\ResolveCluster\_10_Basic_Resolve_ClusterTest::TestResolveClusterOptionalParamsAreAccepted' => 'Bool mismatch',
6061
'Indices\SimulateIndexTemplate\_10_BasicTest::SimulateIndexTemplateWithIndexNotMatchingAnyTemplate' => 'Bool mismatch',
62+
'Indices\ValidateQuery\_10_SynonymsTest::ValidateQueryWithSynonyms' => 'Failed asserting that two strings are equal',
6163
'IngestGeoip\_20_Geoip_ProcessorTest::*' => 'Undefined array key "geoip"',
6264
'IngestGeoip\_30_Geoip_StatsTest::TestGeoipStats' => 'Undefined array key "_arbitrary_key_"',
6365
'IngestGeoip\_50_Ip_Lookup_ProcessorTest::TestIp_locationProcessorWithDefaults' => 'Undefined array key "ip_location"',
66+
'Search\Suggest\_20_PhraseTest::BreaksTiesBySortingTerms' => 'body not supported',
67+
'Search\_330_Fetch_FieldsTest::TestWithSubobjectsAuto' => 'unknown subobjects value: auto',
6468
'Search\Vectors\_90_Sparse_VectorTest::SparseVectorIn800X8110' => 'Undefined array key error',
6569
'Snapshot\Create\_10_BasicTest::CreateASnapshot' => 'Invalid snapshot name [test_snapshot]',
6670
'Snapshot\Create\_10_BasicTest::CreateASnapshotAndCleanUpRepository' => 'Invalid snapshot name [test_snapshot]',
@@ -270,15 +274,15 @@ public function build(): array
270274
self::TEMPLATE_FUNCTION_SKIPPED,
271275
[
272276
':name' => $functionName,
273-
':skipped_msg' => $skip[$skippedAllTest]
277+
':skipped_msg' => addslashes($skip[$skippedAllTest])
274278
]
275279
);
276280
} elseif (isset($skip[$skippedTest])) {
277281
$functions .= self::render(
278282
self::TEMPLATE_FUNCTION_SKIPPED,
279283
[
280284
':name' => $functionName,
281-
':skipped_msg' => $skip[$skippedTest]
285+
':skipped_msg' => addslashes($skip[$skippedTest])
282286
]
283287
);
284288
} else {

0 commit comments

Comments
 (0)