XLSX Reader should add a space between text nodes (#229)

When a cell contains multiple text nodes, the cell value is currently obtained by concatenating the value of each text node.
Instead, values should still be concatenated but a space should be added in between.
This commit is contained in:
Adrien Loison committed 2016-05-23 14:15:48 -07:00
1 parent a24e794177
commit 2c80b1f23a
3 files changed
+25 -2

No files matched your search

@@ -82,6 +82,22 @@ class SharedStringsHelperTest extends \PHPUnit_Framework_TestCase
$sharedStringsHelper->cleanup();
}
/**
* @return void
*/
public function testGetStringAtIndexShouldWorkWithStringsContainingTextAndHyperlinkInSameCell()
{
$resourcePath = $this->getResourcePath('one_sheet_with_shared_strings_containing_text_and_hyperlink_in_same_cell.xlsx');
$sharedStringsHelper = new SharedStringsHelper($resourcePath);
$sharedStringsHelper->extractSharedStrings();
$sharedString = $sharedStringsHelper->getStringAtIndex(0);
$this->assertEquals('go to https://github.com please', $sharedString);
$sharedStringsHelper->cleanup();
}
/**
* @return void
*/