public function testRenderCellJsonWithFormattingAndProperties()
 {
     $expected = '{"v":new Date(2013,9,19),"f":"2013-10-19","p":{"prop":"val"}}';
     $date = new Date('Oct 19, 2013');
     $formattedDate = $date->format("Y-m-d");
     $cell = new TableCell(new DateValue($date), $formattedDate);
     $cell->setCustomProperty('prop', 'val');
     $renderer = new JsonRenderer();
     $actual = $renderer->renderCellJson($cell, true, false, true);
     $this->assertSame($expected, $actual, "TableCell rendered json must match expected value");
 }
 public function testSetCustomProperty()
 {
     $propertyName = 'property-name';
     $propertyValue = 'value';
     $cell = new TableCell(new TextValue('test'));
     $cell->setCustomProperty($propertyName, $propertyValue);
     $this->assertSame($propertyValue, $cell->getCustomProperty($propertyName), "getCustomProperty must return the property name");
 }