Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / console / Tests / TerminalTest.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\Console\Tests;
13
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\Console\Terminal;
16
17 class TerminalTest extends TestCase
18 {
19     public function test()
20     {
21         putenv('COLUMNS=100');
22         putenv('LINES=50');
23         $terminal = new Terminal();
24         $this->assertSame(100, $terminal->getWidth());
25         $this->assertSame(50, $terminal->getHeight());
26
27         putenv('COLUMNS=120');
28         putenv('LINES=60');
29         $terminal = new Terminal();
30         $this->assertSame(120, $terminal->getWidth());
31         $this->assertSame(60, $terminal->getHeight());
32     }
33
34     public function test_zero_values()
35     {
36         putenv('COLUMNS=0');
37         putenv('LINES=0');
38
39         $terminal = new Terminal();
40
41         $this->assertSame(0, $terminal->getWidth());
42         $this->assertSame(0, $terminal->getHeight());
43     }
44 }