Completed
Push — master ( 4515d3...cb8d9e )
by Stefan
02:10
created

SheetTest::setUpBeforeClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
class SheetTest 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...
4
{
5
    /**
6
     * @var OneSheet\Sheet
7
     */
8
    protected static $sheet;
9
10
    public static function setUpBeforeClass()
11
    {
12
        self::$sheet = new \OneSheet\Sheet('A2');
13
    }
14
15
    public function testSheetFilePath()
16
    {
17
        $this->assertEquals(sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'sheet1.xml', self::$sheet->sheetFilePath());
18
    }
19
20
    public function testAddStyle()
21
    {
22
        $style = $this->getMock('OneSheet\\Style');
0 ignored issues
show
Deprecated Code introduced by
The method PHPUnit_Framework_TestCase::getMock() has been deprecated with message: Method deprecated since Release 5.4.0

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
23
        $this->assertGreaterThan(1, \OneSheet\StyleHelper::buildStyle($style));
24
    }
25
}
26