source: spip-zone/_plugins_/yaml/trunk/vendor/symfony/yaml/Tests/ParseExceptionTest.php @ 110467

Last change on this file since 110467 was 110467, checked in by eric@…, 16 months ago

Premiers tests de mise à jour.

  • Property svn:eol-style set to native
File size: 1.0 KB
Line 
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
12namespace Symfony\Component\Yaml\Tests;
13
14use PHPUnit\Framework\TestCase;
15use Symfony\Component\Yaml\Exception\ParseException;
16
17class 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}
Note: See TracBrowser for help on using the repository browser.