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

TestCellHelper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 2
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testBuildString() 0 11 1
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
}