function testSerialize() { $arr = array('ABC, Inc.', 'North American Division', 'Marketing;Sales'); $elem = new Compound('ORG'); $elem->setParts($arr); $this->assertEquals("ORG:ABC\\, Inc.;North American Division;Marketing\\;Sales\r\n", $elem->serialize()); }
function testGetPartsNull() { $str = 'ABC\\, Inc.;North American Division;Marketing\\;Sales'; $elem = new Compound('ORG', null); $this->assertEquals(0, count($elem->getParts())); }