Use real section metadata in tests
* Most of the files were generated from the validate* script.
* Post-processing of these generated files to fix problems:
- Some of the files were binary-edited via "vi -b" to fix some
issues with bad property names used in the prior step.
1.36, 1.38, 1.39 files were all fixed up this way.
- In addition, the 1.36 file had bad data (not sure if the wrong
php version was used) but I fixed this by splicing in data
from the 1.38 file to revert incorrect changes to "Categories"
and "IndexPolicy" properties.
- The 1.35 data file was binary edited by splicing data from the
now 1.36 version.
Change-Id: I4e22b94ce30c2ad9b1f544c15e1c3cd0dd0bce6b
This commit is contained in:
parent
af9eb85fdf
commit
bcb7009c41
10 changed files with 6 additions and 6 deletions
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
{"Text":"","LanguageLinks":["link1","link2"],"Categories":{"category2":"1","category1":"2"},"Indicators":{"indicator1":"indicator1_value"},"TitleText":"title_text1","Links":{"0":{"Link1":42},"2":{"Link2":43}},"LinksSpecial":[],"Templates":{"10":{"Template1":42}},"TemplateIds":{"10":{"Template1":4242}},"Images":{"Image1":1},"FileSearchOptions":{"Image1":{"time":"19731129213309","sha1":"test_sha1"}},"ExternalLinks":{"https://test.org":1},"InterwikiLinks":{"enwiki":{"interwiki1":1,"interwiki2":1}},"NewSection":true,"HideNewSection":true,"NoGallery":false,"HeadItems":{"tag1":"head_item1"},"Modules":["module1"],"ModuleStyles":["module_style1"],"JsConfigVars":{"key1":"value1"},"OutputHooks":[["hook1",{"boolean":true,"null":null,"number":42,"string":"string","array":[1,2,3],"map":{"key":"value"}}]],"Warnings":{"warning1":1},"Sections":["section1","section2"],"Properties":[],"TOCHTML":"tochtml1","Timestamp":"20010419042521","EnableOOUI":true,"IndexPolicy":"noindex","ExtensionData":[],"LimitReportData":{"limit_report_key1":"value1"},"LimitReportJSData":{"limit_report_key1":"value1"},"ParseStartTime":[],"PreventClickjacking":false,"ExtraScriptSrcs":[],"ExtraDefaultSrcs":[],"ExtraStyleSrcs":[],"Flags":{"test":true},"SpeculativeRevId":42,"SpeculativePageIdUsed":null,"RevisionTimestampUsed":null,"RevisionUsedSha1Base36":null,"WrapperDivClasses":[],"ParseUsedOptions":[],"CacheExpiry":null,"CacheTime":"","CacheRevisionId":null,"_type_":"ParserOutput"}
|
||||
{"Text":"","LanguageLinks":["link1","link2"],"Categories":{"category2":"1","category1":"2"},"Indicators":{"indicator1":"indicator1_value"},"TitleText":"title_text1","Links":{"0":{"Link1":42},"2":{"Link2":43}},"LinksSpecial":[],"Templates":{"10":{"Template1":42}},"TemplateIds":{"10":{"Template1":4242}},"Images":{"Image1":1},"FileSearchOptions":{"Image1":{"time":"19731129213309","sha1":"test_sha1"}},"ExternalLinks":{"https://test.org":1},"InterwikiLinks":{"enwiki":{"interwiki1":1,"interwiki2":1}},"NewSection":true,"HideNewSection":true,"NoGallery":false,"HeadItems":{"tag1":"head_item1"},"Modules":["module1"],"ModuleStyles":["module_style1"],"JsConfigVars":{"key1":"value1"},"OutputHooks":[["hook1",{"boolean":true,"null":null,"number":42,"string":"string","array":[1,2,3],"map":{"key":"value"}}]],"Warnings":{"warning1":1},"Sections":[{"toclevel":0,"line":"heading_1","level":1,"number":"1.0","index":"T-1","fromtitle":"","byteoffset":null,"anchor":"heading_1","linkAnchor":"#heading_1"},{"toclevel":1,"line":"heading_2","level":2,"number":"2.0","index":"T-2","fromtitle":"","byteoffset":null,"anchor":"heading_2","linkAnchor":"#heading_2"}],"Properties":[],"TOCHTML":"tochtml1","Timestamp":"20010419042521","EnableOOUI":true,"IndexPolicy":"noindex","ExtensionData":[],"LimitReportData":{"limit_report_key1":"value1"},"LimitReportJSData":{"limit_report_key1":"value1"},"ParseStartTime":[],"PreventClickjacking":false,"ExtraScriptSrcs":[],"ExtraDefaultSrcs":[],"ExtraStyleSrcs":[],"Flags":{"test":true},"SpeculativeRevId":42,"SpeculativePageIdUsed":null,"RevisionTimestampUsed":null,"RevisionUsedSha1Base36":null,"WrapperDivClasses":[],"ParseUsedOptions":[],"CacheExpiry":null,"CacheTime":"","CacheRevisionId":null,"_type_":"ParserOutput"}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
{"Text":"","LanguageLinks":["link1","link2"],"Categories":{"category2":"1","category1":"2"},"Indicators":{"indicator1":"indicator1_value"},"TitleText":"title_text1","Links":{"0":{"Link1":42},"2":{"Link2":43}},"LinksSpecial":[],"Templates":{"10":{"Template1":42}},"TemplateIds":{"10":{"Template1":4242}},"Images":{"Image1":1},"FileSearchOptions":{"Image1":{"time":"19731129213309","sha1":"test_sha1"}},"ExternalLinks":{"https://test.org":1},"InterwikiLinks":{"enwiki":{"interwiki1":1,"interwiki2":1}},"NewSection":true,"HideNewSection":true,"NoGallery":false,"HeadItems":{"tag1":"head_item1"},"Modules":["module1"],"ModuleStyles":["module_style1"],"JsConfigVars":{"key1":"value1"},"OutputHooks":[["hook1",{"boolean":true,"null":null,"number":42,"string":"string","array":[1,2,3],"map":{"key":"value"}}]],"Warnings":{"warning1":1},"Sections":["section1","section2"],"Properties":[],"TOCHTML":"tochtml1","Timestamp":"20010419042521","EnableOOUI":true,"IndexPolicy":"noindex","ExtensionData":[],"LimitReportData":{"limit_report_key1":"value1"},"LimitReportJSData":{"limit_report_key1":"value1"},"CacheMessage":"","ParseStartTime":[],"PreventClickjacking":false,"ExtraScriptSrcs":[],"ExtraDefaultSrcs":[],"ExtraStyleSrcs":[],"Flags":{"test":true},"SpeculativeRevId":42,"SpeculativePageIdUsed":null,"RevisionTimestampUsed":null,"RevisionUsedSha1Base36":null,"WrapperDivClasses":[],"ParseUsedOptions":[],"CacheExpiry":null,"CacheTime":"","CacheRevisionId":null,"_type_":"ParserOutput"}
|
||||
{"Text":"","LanguageLinks":["link1","link2"],"Categories":{"category2":"1","category1":"2"},"Indicators":{"indicator1":"indicator1_value"},"TitleText":"title_text1","Links":{"0":{"Link1":42},"2":{"Link2":43}},"LinksSpecial":[],"Templates":{"10":{"Template1":42}},"TemplateIds":{"10":{"Template1":4242}},"Images":{"Image1":1},"FileSearchOptions":{"Image1":{"time":"19731129213309","sha1":"test_sha1"}},"ExternalLinks":{"https://test.org":1},"InterwikiLinks":{"enwiki":{"interwiki1":1,"interwiki2":1}},"NewSection":true,"HideNewSection":true,"NoGallery":false,"HeadItems":{"tag1":"head_item1"},"Modules":["module1"],"ModuleStyles":["module_style1"],"JsConfigVars":{"key1":"value1"},"OutputHooks":[["hook1",{"boolean":true,"null":null,"number":42,"string":"string","array":[1,2,3],"map":{"key":"value"}}]],"Warnings":{"warning1":1},"Sections":[{"toclevel":0,"line":"heading_1","level":1,"number":"1.0","index":"T-1","fromtitle":"","byteoffset":null,"anchor":"heading_1","linkAnchor":"#heading_1"},{"toclevel":1,"line":"heading_2","level":2,"number":"2.0","index":"T-2","fromtitle":"","byteoffset":null,"anchor":"heading_2","linkAnchor":"#heading_2"}],"Properties":[],"TOCHTML":"tochtml1","Timestamp":"20010419042521","EnableOOUI":true,"IndexPolicy":"noindex","ExtensionData":[],"LimitReportData":{"limit_report_key1":"value1"},"LimitReportJSData":{"limit_report_key1":"value1"},"CacheMessage":"","ParseStartTime":[],"PreventClickjacking":false,"ExtraScriptSrcs":[],"ExtraDefaultSrcs":[],"ExtraStyleSrcs":[],"Flags":{"test":true},"SpeculativeRevId":42,"SpeculativePageIdUsed":null,"RevisionTimestampUsed":null,"RevisionUsedSha1Base36":null,"WrapperDivClasses":[],"ParseUsedOptions":[],"CacheExpiry":null,"CacheTime":"","CacheRevisionId":null,"_type_":"ParserOutput"}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
{"Text":"","LanguageLinks":["link1","link2"],"Categories":{"category2":"1","category1":"2"},"Indicators":{"indicator1":"indicator1_value"},"TitleText":"title_text1","Links":{"0":{"Link1":42},"2":{"Link2":43}},"LinksSpecial":[],"Templates":{"10":{"Template1":42}},"TemplateIds":{"10":{"Template1":4242}},"Images":{"Image1":1},"FileSearchOptions":{"Image1":{"time":"19731129213309","sha1":"test_sha1"}},"ExternalLinks":{"https://test.org":1},"InterwikiLinks":{"enwiki":{"interwiki1":1,"interwiki2":1}},"NewSection":true,"HideNewSection":true,"NoGallery":false,"HeadItems":{"tag1":"head_item1"},"Modules":["module1"],"ModuleStyles":["module_style1"],"JsConfigVars":{"key1":"value1"},"OutputHooks":[["hook1",{"boolean":true,"null":null,"number":42,"string":"string","array":[1,2,3],"map":{"key":"value"}}]],"Warnings":{"warning1":1},"Sections":["section1","section2"],"Properties":[],"TOCHTML":"tochtml1","Timestamp":"20010419042521","EnableOOUI":true,"IndexPolicy":"noindex","ExtensionData":[],"LimitReportData":{"limit_report_key1":"value1"},"LimitReportJSData":{"limit_report_key1":"value1"},"CacheMessage":"","ParseStartTime":[],"PreventClickjacking":false,"ExtraScriptSrcs":[],"ExtraDefaultSrcs":[],"ExtraStyleSrcs":[],"Flags":{"test":true},"SpeculativeRevId":42,"SpeculativePageIdUsed":null,"RevisionTimestampUsed":null,"RevisionUsedSha1Base36":null,"WrapperDivClasses":[],"ParseUsedOptions":[],"CacheExpiry":null,"CacheTime":"","CacheRevisionId":null,"_type_":"ParserOutput"}
|
||||
{"Text":"","LanguageLinks":["link1","link2"],"Categories":{"category2":"1","category1":"2"},"Indicators":{"indicator1":"indicator1_value"},"TitleText":"title_text1","Links":{"0":{"Link1":42},"2":{"Link2":43}},"LinksSpecial":[],"Templates":{"10":{"Template1":42}},"TemplateIds":{"10":{"Template1":4242}},"Images":{"Image1":1},"FileSearchOptions":{"Image1":{"time":"19731129213309","sha1":"test_sha1"}},"ExternalLinks":{"https://test.org":1},"InterwikiLinks":{"enwiki":{"interwiki1":1,"interwiki2":1}},"NewSection":true,"HideNewSection":true,"NoGallery":false,"HeadItems":{"tag1":"head_item1"},"Modules":["module1"],"ModuleStyles":["module_style1"],"JsConfigVars":{"key1":"value1"},"OutputHooks":[["hook1",{"boolean":true,"null":null,"number":42,"string":"string","array":[1,2,3],"map":{"key":"value"}}]],"Warnings":{"warning1":1},"Sections":[{"toclevel":0,"line":"heading_1","level":1,"number":"1.0","index":"T-1","fromtitle":"","byteoffset":null,"anchor":"heading_1","linkAnchor":"#heading_1"},{"toclevel":1,"line":"heading_2","level":2,"number":"2.0","index":"T-2","fromtitle":"","byteoffset":null,"anchor":"heading_2","linkAnchor":"#heading_2"}],"Properties":[],"TOCHTML":"tochtml1","Timestamp":"20010419042521","EnableOOUI":true,"IndexPolicy":"noindex","ExtensionData":[],"LimitReportData":{"limit_report_key1":"value1"},"LimitReportJSData":{"limit_report_key1":"value1"},"CacheMessage":"","ParseStartTime":[],"PreventClickjacking":false,"ExtraScriptSrcs":[],"ExtraDefaultSrcs":[],"ExtraStyleSrcs":[],"Flags":{"test":true},"SpeculativeRevId":42,"SpeculativePageIdUsed":null,"RevisionTimestampUsed":null,"RevisionUsedSha1Base36":null,"WrapperDivClasses":[],"ParseUsedOptions":[],"CacheExpiry":null,"CacheTime":"","CacheRevisionId":null,"_type_":"ParserOutput"}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
{"Text":"","LanguageLinks":["link1","link2"],"Categories":{"category2":"1","category1":"2"},"Indicators":{"indicator1":"indicator1_value"},"TitleText":"title_text1","Links":{"0":{"Link1":42},"2":{"Link2":43}},"LinksSpecial":[],"Templates":{"10":{"Template1":42}},"TemplateIds":{"10":{"Template1":4242}},"Images":{"Image1":1},"FileSearchOptions":{"Image1":{"time":"19731129213309","sha1":"test_sha1"}},"ExternalLinks":{"https://test.org":1},"InterwikiLinks":{"enwiki":{"interwiki1":1,"interwiki2":1}},"NewSection":true,"HideNewSection":true,"NoGallery":false,"HeadItems":{"tag1":"head_item1"},"Modules":["module1"],"ModuleStyles":["module_style1"],"JsConfigVars":{"key1":"value1"},"OutputHooks":[["hook1",{"boolean":true,"null":null,"number":42,"string":"string","array":[1,2,3],"map":{"key":"value"}}]],"Warnings":{"warning1":1},"Sections":["section1","section2"],"Properties":[],"TOCHTML":"tochtml1","Timestamp":"20010419042521","EnableOOUI":true,"IndexPolicy":"noindex","ExtensionData":[],"LimitReportData":{"limit_report_key1":"value1"},"LimitReportJSData":{"limit_report_key1":"value1"},"CacheMessage":"","ParseStartTime":[],"PreventClickjacking":false,"ExtraScriptSrcs":[],"ExtraDefaultSrcs":[],"ExtraStyleSrcs":[],"Flags":{"test":true},"SpeculativeRevId":42,"SpeculativePageIdUsed":null,"RevisionTimestampUsed":null,"RevisionUsedSha1Base36":null,"WrapperDivClasses":[],"ParseUsedOptions":[],"CacheExpiry":null,"CacheTime":"","CacheRevisionId":null,"_type_":"ParserOutput"}
|
||||
{"Text":"","LanguageLinks":["link1","link2"],"Categories":{"category2":"1","category1":"2"},"Indicators":{"indicator1":"indicator1_value"},"TitleText":"title_text1","Links":{"0":{"Link1":42},"2":{"Link2":43}},"LinksSpecial":[],"Templates":{"10":{"Template1":42}},"TemplateIds":{"10":{"Template1":4242}},"Images":{"Image1":1},"FileSearchOptions":{"Image1":{"time":"19731129213309","sha1":"test_sha1"}},"ExternalLinks":{"https://test.org":1},"InterwikiLinks":{"enwiki":{"interwiki1":1,"interwiki2":1}},"NewSection":true,"HideNewSection":true,"NoGallery":false,"HeadItems":{"tag1":"head_item1"},"Modules":["module1"],"ModuleStyles":["module_style1"],"JsConfigVars":{"key1":"value1"},"OutputHooks":[["hook1",{"boolean":true,"null":null,"number":42,"string":"string","array":[1,2,3],"map":{"key":"value"}}]],"Warnings":{"warning1":1},"Sections":[{"toclevel":0,"line":"heading_1","level":1,"number":"1.0","index":"T-1","fromtitle":"","byteoffset":null,"anchor":"heading_1","linkAnchor":"#heading_1"},{"toclevel":1,"line":"heading_2","level":2,"number":"2.0","index":"T-2","fromtitle":"","byteoffset":null,"anchor":"heading_2","linkAnchor":"#heading_2"}],"Properties":[],"TOCHTML":"tochtml1","Timestamp":"20010419042521","EnableOOUI":true,"IndexPolicy":"noindex","ExtensionData":[],"LimitReportData":{"limit_report_key1":"value1"},"LimitReportJSData":{"limit_report_key1":"value1"},"CacheMessage":"","ParseStartTime":[],"PreventClickjacking":false,"ExtraScriptSrcs":[],"ExtraDefaultSrcs":[],"ExtraStyleSrcs":[],"Flags":{"test":true},"SpeculativeRevId":42,"SpeculativePageIdUsed":null,"RevisionTimestampUsed":null,"RevisionUsedSha1Base36":null,"WrapperDivClasses":[],"ParseUsedOptions":[],"CacheExpiry":null,"CacheTime":"","CacheRevisionId":null,"_type_":"ParserOutput"}
|
||||
Binary file not shown.
|
|
@ -209,7 +209,7 @@ abstract class ParserCacheSerializationTestCases {
|
|||
$parserOutputWithMetadata->addCategory( 'category1', '2' );
|
||||
$parserOutputWithMetadata->setIndicator( 'indicator1', 'indicator1_value' );
|
||||
$parserOutputWithMetadata->setTitleText( 'title_text1' );
|
||||
$parserOutputWithMetadata->setSections( [ 'section1', 'section2' ] );
|
||||
$parserOutputWithMetadata->setSections( self::SECTIONS );
|
||||
$parserOutputWithMetadata->addLink( Title::makeTitle( NS_MAIN, 'Link1' ), 42 );
|
||||
$parserOutputWithMetadata->addLink( Title::makeTitle( NS_USER, 'Link2' ), 43 );
|
||||
$parserOutputWithMetadata->addTemplate(
|
||||
|
|
@ -383,7 +383,7 @@ abstract class ParserCacheSerializationTestCases {
|
|||
], $object->getCategories() );
|
||||
$testCase->assertArrayEquals( [ 'indicator1' => 'indicator1_value' ], $object->getIndicators() );
|
||||
$testCase->assertSame( 'title_text1', $object->getTitleText() );
|
||||
$testCase->assertArrayEquals( [ 'section1', 'section2' ], $object->getSections() );
|
||||
$testCase->assertArrayEquals( self::SECTIONS, $object->getSections() );
|
||||
$testCase->assertArrayEquals( [
|
||||
NS_MAIN => [ 'Link1' => 42 ],
|
||||
NS_USER => [ 'Link2' => 43 ]
|
||||
|
|
|
|||
Loading…
Reference in a new issue