/**
     * @covers Intacct\Functions\Projects\TimesheetEntryCreate::writeXml
     */
    public function testParamOverrides()
    {
        $expected = <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<TIMESHEETENTRY>
    <ENTRYDATE>06/30/2016</ENTRYDATE>
    <QTY>1.75</QTY>
    <DESCRIPTION>desc</DESCRIPTION>
    <NOTES>my note</NOTES>
    <TASKKEY>1234</TASKKEY>
    <TIMETYPE>Salary</TIMETYPE>
    <BILLABLE>true</BILLABLE>
    <EXTBILLRATE>200</EXTBILLRATE>
    <EXTCOSTRATE>175</EXTCOSTRATE>
    <DEPARTMENTID>ADM</DEPARTMENTID>
    <LOCATIONID>100</LOCATIONID>
    <PROJECTID>P100</PROJECTID>
    <CUSTOMERID>C100</CUSTOMERID>
    <VENDORID>V100</VENDORID>
    <ITEMID>I100</ITEMID>
    <CLASSID>C200</CLASSID>
    <CONTRACTID>C300</CONTRACTID>
    <WAREHOUSEID>W100</WAREHOUSEID>
    <customfield1>customvalue1</customfield1>
</TIMESHEETENTRY>
EOF;
        $xml = new XMLWriter();
        $xml->openMemory();
        $xml->setIndent(true);
        $xml->setIndentString('    ');
        $xml->startDocument();
        $line = new TimesheetEntryCreate();
        $line->setEntryDate(new DateType('2016-06-30'));
        $line->setQuantity(1.75);
        $line->setDescription('desc');
        $line->setNotes('my note');
        $line->setTaskRecordNo(1234);
        $line->setTimeTypeName('Salary');
        $line->setBillable(true);
        $line->setOverrideBillingRate(200.0);
        $line->setOverrideLaborCostRate(175.0);
        $line->setDepartmentId('ADM');
        $line->setLocationId('100');
        $line->setProjectId('P100');
        $line->setCustomerId('C100');
        $line->setVendorId('V100');
        $line->setItemId('I100');
        $line->setClassId('C200');
        $line->setContractId('C300');
        $line->setWarehouseId('W100');
        $line->setCustomFields(['customfield1' => 'customvalue1']);
        $line->writeXml($xml);
        $this->assertXmlStringEqualsXmlString($expected, $xml->flush());
    }
    /**
     * @covers Intacct\Functions\Projects\TimesheetCreate::writeXml
     */
    public function testParamOverrides()
    {
        $expected = <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<function controlid="unittest">
    <create>
        <TIMESHEET>
            <EMPLOYEEID>E1234</EMPLOYEEID>
            <BEGINDATE>06/30/2016</BEGINDATE>
            <DESCRIPTION>desc</DESCRIPTION>
            <SUPDOCID>A1234</SUPDOCID>
            <STATE>Submitted</STATE>
            <TIMESHEETENTRIES>
                <TIMESHEETENTRY>
                    <ENTRYDATE>06/30/2016</ENTRYDATE>
                    <QTY>1.75</QTY>
                </TIMESHEETENTRY>
            </TIMESHEETENTRIES>
            <customfield1>customvalue1</customfield1>
        </TIMESHEET>
    </create>
</function>
EOF;
        $xml = new XMLWriter();
        $xml->openMemory();
        $xml->setIndent(true);
        $xml->setIndentString('    ');
        $xml->startDocument();
        $record = new TimesheetCreate('unittest');
        $record->setEmployeeId('E1234');
        $record->setBeginDate(new DateType('2016-06-30'));
        $record->setDescription('desc');
        $record->setAttachmentsId('A1234');
        $record->setAction('Submitted');
        $record->setCustomFields(['customfield1' => 'customvalue1']);
        $entry1 = new TimesheetEntryCreate();
        $entry1->setEntryDate(new DateType('2016-06-30'));
        $entry1->setQuantity(1.75);
        $record->setEntries([$entry1]);
        $record->writeXml($xml);
        $this->assertXmlStringEqualsXmlString($expected, $xml->flush());
    }