Added test for the case of objects as cells

I encountered this in Drupal 8, where cells implemented the
MarkupInterface. It was objects that, when cast to a string,
returned the translated string.

Before 5ca540daa7, this new test
would fail.
This commit is contained in:
Fonata
2020-01-06 18:07:42 +01:00
parent b792a6cc7b
commit c12b6ba671
3 changed files with 25 additions and 9 deletions

View File

@@ -0,0 +1,13 @@
<?php
namespace ParseCsv\tests\methods;
/**
* Class HasToString is just a helper to test if cells can be objects.
*/
class ObjectThatHasToStringMethod {
public function __toString() {
return 'some value';
}
}