Completed
Push — master ( 3bcbcb...b18a21 )
by Stefan
02:44
created

TestCellHelper::testBuildString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 11
rs 9.4285
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
3
/**
4
 * @author neun
5
 * @since  2016-07-09
6
 */
7
class TestCellHelper extends PHPUnit_Framework_TestCase
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
8
{
9
    public function testBuildString()
10
    {
11
        $string = \OneSheet\CellHelper::buildString(33, 44, "987456");
12
        $this->assertEquals('<c r="AS33" s="0"><v>987456</v></c>', $string);
13
14
        $string = \OneSheet\CellHelper::buildString(77, 2222, "some text", 2);
15
        $this->assertEquals('<c r="CGM77" s="2" t="inlineStr"><is><t>some text</t></is></c>', $string);
16
17
        $string = \OneSheet\CellHelper::buildString(1, 0, "this & that", 1);
18
        $this->assertEquals('<c r="A1" s="1" t="inlineStr"><is><t>this &amp; that</t></is></c>', $string);
19
    }
20
}