1<?php
2
3/*
4 * This file is part of Twig.
5 *
6 * (c) Fabien Potencier
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12class Twig_Tests_Grammar_OptionalTest extends \PHPUnit\Framework\TestCase
13{
14    public function testMagicToString()
15    {
16        $grammar = new Twig_Extensions_Grammar_Optional(new Twig_Extensions_Grammar_Constant('foo'), new Twig_Extensions_Grammar_Number('bar'));
17        $this->assertEquals('[foo <bar:number>]', (string) $grammar);
18    }
19}
20