Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-03-22 19:44:47 +0300
committerOlivier Paroz <github@oparoz.com>2015-03-22 19:44:47 +0300
commit5272c42058547c5a9411a0200f71a0394a6417ee (patch)
tree02ac697834c50ced8ab149d7f236edad0e4524bc /vendor/symfony/yaml/Symfony/Component/Yaml/Tests/ParseExceptionTest.php
parentc7af20b4be55f86edce153a8e6ca6a4239a239d8 (diff)
Introducing album preferences via yaml file
Filling request #93 and #85 Partial solution for #91
Diffstat (limited to 'vendor/symfony/yaml/Symfony/Component/Yaml/Tests/ParseExceptionTest.php')
-rw-r--r--vendor/symfony/yaml/Symfony/Component/Yaml/Tests/ParseExceptionTest.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/ParseExceptionTest.php b/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/ParseExceptionTest.php
new file mode 100644
index 00000000..e4eb9c98
--- /dev/null
+++ b/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/ParseExceptionTest.php
@@ -0,0 +1,41 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Yaml\Tests;
+
+use Symfony\Component\Yaml\Exception\ParseException;
+
+class ParseExceptionTest extends \PHPUnit_Framework_TestCase
+{
+ public function testGetMessage()
+ {
+ $exception = new ParseException('Error message', 42, 'foo: bar', '/var/www/app/config.yml');
+ if (PHP_VERSION_ID >= 50400) {
+ $message = 'Error message in "/var/www/app/config.yml" at line 42 (near "foo: bar")';
+ } else {
+ $message = 'Error message in "\\/var\\/www\\/app\\/config.yml" at line 42 (near "foo: bar")';
+ }
+
+ $this->assertEquals($message, $exception->getMessage());
+ }
+
+ public function testGetMessageWithUnicodeInFilename()
+ {
+ $exception = new ParseException('Error message', 42, 'foo: bar', 'äöü.yml');
+ if (PHP_VERSION_ID >= 50400) {
+ $message = 'Error message in "äöü.yml" at line 42 (near "foo: bar")';
+ } else {
+ $message = 'Error message in "\u00e4\u00f6\u00fc.yml" at line 42 (near "foo: bar")';
+ }
+
+ $this->assertEquals($message, $exception->getMessage());
+ }
+}