summaryrefslogtreecommitdiffstats
path: root/tests/Plugin/BasePluginTest.php
diff options
context:
space:
mode:
authorh-hishida <h-hishida@quartetcom.co.jp>2015-04-28 09:45:00 +0900
committerh-hishida <h-hishida@quartetcom.co.jp>2015-04-28 09:45:00 +0900
commit373ae12ca5db9837f84fef44f3f7077e766aca08 (patch)
treec515f2cccceaa886282ac40f89785da072a3627e /tests/Plugin/BasePluginTest.php
downloadPHPExcelFixer.StyleFixer-373ae12ca5db9837f84fef44f3f7077e766aca08.zip
PHPExcelFixer.StyleFixer-373ae12ca5db9837f84fef44f3f7077e766aca08.tar.gz
PHPExcelFixer.StyleFixer-373ae12ca5db9837f84fef44f3f7077e766aca08.tar.bz2
initial commit
Diffstat (limited to 'tests/Plugin/BasePluginTest.php')
-rw-r--r--tests/Plugin/BasePluginTest.php49
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/Plugin/BasePluginTest.php b/tests/Plugin/BasePluginTest.php
new file mode 100644
index 0000000..0686eb4
--- /dev/null
+++ b/tests/Plugin/BasePluginTest.php
@@ -0,0 +1,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 = '';
+ }
+}