blob: 0686eb43b7cf19c5a9becaab7bdb68fc669692e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
<?php
namespace PHPExcel\StyleFixer\Plugin;
abstract class BasePluginTest extends \PHPUnit_Framework_TestCase
{
private $basePath;
public function setUp()
{
$this->basePath = __DIR__.'/../xml';
}
public function getOutputXml($path)
{
return file_get_contents($this->basePath.'/output/'.$path);
}
public function getTemplateXml($path)
{
return file_get_contents($this->basePath.'/template/'.$path);
}
/**
* @param int $count
* @param array $map
* @return \PHPUnit_Framework_MockObject_MockObject
*/
protected function createBookUtil($count, $map)
{
$bookUtil = $this->getMock('PHPExcel\StyleFixer\Util\Book');
$bookUtil
->expects($this->exactly($count))
->method('makeSheetMap')
->with($this->isInstanceOf('\ZipArchive'))
->will($this->returnValue($map))
;
return $bookUtil;
}
public function tearDown()
{
$this->output_stylesXml = '';
$this->template_stylesXml = '';
}
}
|