fix test for #8680: Allow OpenDocument library to replace markers
authorAlexander Stintzing <a.stintzing@metaways.de>
Mon, 5 Aug 2013 09:39:48 +0000 (11:39 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 5 Aug 2013 12:17:03 +0000 (14:17 +0200)
https://forge.tine20.org/mantisbt/view.php?id=8680
Change-Id: Ice8111df8f72719f00f1f1417850afded11b752b
Reviewed-on: https://gerrit.tine20.org/tine20/2226
Tested-by: jenkins user
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tests/tine20/library/OpenDocument/DocumentTests.php

index bc1d2fb..f09a4f9 100644 (file)
@@ -59,11 +59,9 @@ class OpenDocument_DocumentTests extends PHPUnit_Framework_TestCase
         
         $ccc = Sales_Controller_CostCenter::getInstance();
         
-        $uid = Tinebase_Record_Abstract::generateUID(4);
-        $cc1 = $ccc->create(new Sales_Model_CostCenter(array('number' => $uid, 'remark' => 'unittest-' . $uid)));
+        $cc1 = $ccc->create(new Sales_Model_CostCenter(array('number' => 'cc1', 'remark' => 'unittest-cc1')));
         
-        $uid = Tinebase_Record_Abstract::generateUID(4);
-        $cc2 = $ccc->create(new Sales_Model_CostCenter(array('number' => $uid, 'remark' => 'unittest-' . $uid)));
+        $cc2 = $ccc->create(new Sales_Model_CostCenter(array('number' => 'cc2', 'remark' => 'unittest-cc2')));
         
         $colInfo = array();
         $colInfo[$cc1->getId()] = $cc1->number;
@@ -89,6 +87,9 @@ class OpenDocument_DocumentTests extends PHPUnit_Framework_TestCase
         unlink($filename);
         
         $spreadSheets = $xml->xpath('//office:body/office:spreadsheet');
+        
+        $this->assertEquals(1, count($spreadSheets));
+        
         $spreadSheet  = $spreadSheets[0];
         
         $results = $spreadSheet->xpath("//text()[contains(., '$markerText')]");