TYPO3
7.6
Users
bogdan
Projects
Kapeli
Resources
Dash
Docsets
TYPO3
src
vendor
symfony
console
Tests
Output
NullOutputTest.php
Go to the documentation of this file.
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\Output
;
13
14
use
Symfony\Component\Console\Output\NullOutput
;
15
use
Symfony\Component\Console\Output\OutputInterface
;
16
17
class
NullOutputTest
extends
\PHPUnit_Framework_TestCase
18
{
19
public
function
testConstructor
()
20
{
21
$output =
new
NullOutput
();
22
23
ob_start();
24
$output->write(
'foo'
);
25
$buffer = ob_get_clean();
26
27
$this->assertSame(
''
, $buffer,
'->write() does nothing (at least nothing is printed)'
);
28
$this->assertFalse($output->isDecorated(),
'->isDecorated() returns false'
);
29
}
30
31
public
function
testVerbosity
()
32
{
33
$output =
new
NullOutput
();
34
$this->assertSame(
OutputInterface::VERBOSITY_QUIET
, $output->getVerbosity(),
'->getVerbosity() returns VERBOSITY_QUIET for NullOutput by default'
);
35
36
$output->setVerbosity(
OutputInterface::VERBOSITY_VERBOSE
);
37
$this->assertSame(
OutputInterface::VERBOSITY_QUIET
, $output->getVerbosity(),
'->getVerbosity() always returns VERBOSITY_QUIET for NullOutput'
);
38
}
39
}
Generated on Wed Nov 11 2015 01:52:00 for TYPO3 by
1.8.3