8 protected function setUp() {
19 $file = $this->
dataFile(
'broken_exif_date.jpg',
'image/jpeg' );
22 $meta = $file->formatMetadata();
23 $this->assertNotEquals(
false, $meta,
'Valid metadata extracted' );
26 $this->assertArrayHasKey(
'visible', $meta );
28 foreach ( $meta[
'visible'] as $i => $data ) {
29 if ( $data[
'id'] ==
'exif-datetimeoriginal' ) {
33 $this->assertNotNull( $dateIndex,
'Date entry exists in metadata' );
34 $this->assertEquals(
'0000:01:00 00:02:27',
35 $meta[
'visible'][$dateIndex][
'value'],
36 'File with invalid date metadata (T31471)' );
47 $class =
new ReflectionClass( FormatMetadata::class );
48 $method = $class->getMethod(
'resolveMultivalueValue' );
49 $method->setAccessible(
true );
50 $actualInput = $method->invoke( $formatMetadata,
$input );
51 $this->assertEquals(
$output, $actualInput );
61 [
'first',
'second',
'third',
'_type' =>
'ol' ],
65 [
'first',
'second',
'third' ],
69 [
'_type' =>
'ol',
'first',
'second',
'third' ],
84 'multilang-multivalue' => [
86 'en' => [
'first',
'second' ],
87 'de' => [
'Erste',
'Zweite' ],
112 [
'Software' =>
'Adobe Photoshop CS6 (Macintosh)' ],
113 [
'Software' =>
'Adobe Photoshop CS6 (Macintosh)' ],
116 [
'Software' => [
'FotoWare FotoStation' ] ],
117 [
'Software' =>
'FotoWare FotoStation' ],
120 [
'Software' => [ [
'Capture One PRO',
'3.7.7' ] ] ],
121 [
'Software' =>
'Capture One PRO (Version 3.7.7)' ],
124 [
'Software' => [ [
'FotoWare ColorFactory',
'' ] ] ],
125 [
'Software' =>
'FotoWare ColorFactory (Version )' ],
128 [
'Software' => [
'x-default' =>
'paint.net 4.0.12',
'_type' =>
'lang' ] ],
129 [
'Software' =>
'<ul class="metadata-langlist">'.
130 '<li class="mw-metadata-lang-default">'.
131 '<span class="mw-metadata-lang-value">paint.net 4.0.12</span>'.
139 [
'Software' => [ [
'Lavf57.25.100' ], [
'Lavf57.25.100' ] ] ],
140 [
'Software' =>
"<ul><li>Lavf57.25.100</li>\n<li>Lavf57.25.100</li></ul>" ],
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title after the basic globals have been set but before ordinary actions take place $output
if(is_array($mode)) switch( $mode) $input