WordFormatterTest::wrapTest()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 12
rs 9.4285
cc 1
eloc 6
nc 1
nop 0
1
<?php
2
3
namespace WordWrapHelper\Tests;
4
5
use WordWrapHelper\WordFormatter;
6
7
class WordFormatterTest extends \PHPUnit_Framework_TestCase {
8
    
9
    /**
10
     * @test
11
     */
12
    public function wrapTest()
13
    {
14
        $wordFormatter = new WordFormatter();
15
        
16
        $content = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.";
17
        
18
        $actualResult = $wordFormatter->wrap($content, 30, '-<br/>');
19
        
20
        $expectedResult = "Lorem Ipsum is simply dummy-<br/>text of the printing and-<br/>typesetting industry. Lorem-<br/>Ipsum has been the industry's-<br/>standard dummy text ever since-<br/>the 1500s, when an unknown-<br/>printer took a galley of type-<br/>and scrambled it to make a-<br/>type specimen book.";
21
        
22
        $this->assertEquals($expectedResult, $actualResult);
23
    }
24
}
25