Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / symfony / yaml / Tests / ParseExceptionTest.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\Yaml\Tests;
13
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\Yaml\Exception\ParseException;
16
17 class ParseExceptionTest extends TestCase
18 {
19     public function testGetMessage()
20     {
21         $exception = new ParseException('Error message', 42, 'foo: bar', '/var/www/app/config.yml');
22         $message = 'Error message in "/var/www/app/config.yml" at line 42 (near "foo: bar")';
23
24         $this->assertEquals($message, $exception->getMessage());
25     }
26
27     public function testGetMessageWithUnicodeInFilename()
28     {
29         $exception = new ParseException('Error message', 42, 'foo: bar', 'äöü.yml');
30         $message = 'Error message in "äöü.yml" at line 42 (near "foo: bar")';
31
32         $this->assertEquals($message, $exception->getMessage());
33     }
34 }