Skip to content

Commit 55a450d

Browse files
committed
Merge branch '3.4' into 4.4
* 3.4: update missing translations arabic [Yaml] simplify the test fix test by letting mock throw the actual expected exception
2 parents 6bb0ef4 + 5f94d34 commit 55a450d

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/BundleEntryReaderTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ public function testFallbackIfLocaleDoesNotExist()
144144
[self::RES_DIR, 'en_GB'],
145145
[self::RES_DIR, 'en']
146146
)
147-
->willReturnOnConsecutiveCalls(self::$data, self::$fallbackData);
147+
->willReturnOnConsecutiveCalls(
148+
$this->throwException(new ResourceBundleNotFoundException()),
149+
self::$fallbackData
150+
);
148151

149152
$this->assertSame('Lah', $this->reader->readEntry(self::RES_DIR, 'en_GB', ['Entries', 'Bam']));
150153
}
@@ -283,7 +286,7 @@ public function testFailIfEntryFoundNeitherInParentNorChild()
283286
[self::RES_DIR, 'en_GB'],
284287
[self::RES_DIR, 'en']
285288
)
286-
->willReturnOnConsecutiveCalls(['Foo' => 'Baz'], ['Foo' => 'Baz']);
289+
->willReturnOnConsecutiveCalls(['Foo' => 'Baz'], ['Foo' => 'Bar']);
287290

288291
$this->reader->readEntry(self::RES_DIR, 'en_GB', ['Foo', 'Bar'], true);
289292
}

src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,10 @@
382382
<source>Each element of this collection should satisfy its own set of constraints.</source>
383383
<target>يجب أن يفي كل عنصر من عناصر هذه المجموعة بمجموعة القيود الخاصة به.</target>
384384
</trans-unit>
385+
<trans-unit id="99">
386+
<source>This value is not a valid International Securities Identification Number (ISIN).</source>
387+
<target> صالح (ISIN) هذه القيمة ليست رقم تعريف الأوراق المالية الدولي.</target>
388+
</trans-unit>
385389
</body>
386390
</file>
387391
</xliff>

src/Symfony/Component/Yaml/Tests/ParserTest.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2457,19 +2457,13 @@ public function testParsingMultipleDocuments()
24572457
c: d
24582458
YAML;
24592459

2460-
$expected = ['a' => ['b' => "row\nrow2\n"], 'c' => 'd'];
2461-
2462-
// The parser was not used before, so there is a new line after row2
2463-
$this->assertSame($expected, $this->parser->parse($longDocument));
2464-
2465-
$parser = new Parser();
24662460
// The first parsing set and fixed the totalNumberOfLines in the Parser before, so parsing the short document here
24672461
// to reproduce the issue. If the issue would not have been fixed, the next assertion will fail
2468-
$parser->parse($shortDocument);
2462+
$this->parser->parse($shortDocument);
24692463

2470-
// After the total number of lines has been rset the result will be the same as if a new parser was used
2464+
// After the total number of lines has been reset the result will be the same as if a new parser was used
24712465
// (before, there was no \n after row2)
2472-
$this->assertSame($expected, $parser->parse($longDocument));
2466+
$this->assertSame(['a' => ['b' => "row\nrow2\n"], 'c' => 'd'], $this->parser->parse($longDocument));
24732467
}
24742468
}
24752469

0 commit comments

Comments
 (0)