Passed
Push — master ( 813fe9...62056b )
by Sebastian
06:01
created

IOUtilTest::testAnswerToBool()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
/**
3
 * This file is part of CaptainHook.
4
 *
5
 * (c) Sebastian Feldmann <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace CaptainHook\App\Console;
11
12
class IOUtilTest extends \PHPUnit_Framework_TestCase
13
{
14
    /**
15
     * Tests IOUtil::answerToBool
16
     */
17
    public function testAnswerToBool()
18
    {
19
        $this->assertTrue(IOUtil::answerToBool('y'));
20
        $this->assertTrue(IOUtil::answerToBool('yes'));
21
        $this->assertTrue(IOUtil::answerToBool('ok'));
22
        $this->assertFalse(IOUtil::answerToBool('foo'));
23
    }
24
}
25