public function testAddGetPageCollection()
 {
     $page = new Page();
     $this->document->addPage($page);
     $pages = $this->document->getPages()->toArray();
     $this->assertEquals($pages[1], $page);
     $pageCollection = $this->document->getPages();
     $pageCollection->add($page);
     $this->assertEquals($pageCollection, $this->document->getPages());
 }
 /**
  * @group array-recursive
  */
 public function testArrayRecursive()
 {
     $epa = new Epa();
     $epa->setDonor(new Donor());
     $epa->addAttorney(new Attorney());
     $epa->addNotifiedRelative(new NotifiedRelative());
     $epa->addNotifiedAttorney(new NotifiedAttorney());
     $epa->addDocument($doc = new IncomingDocument());
     $doc->addPage(new Page());
     $this->assertEquals(array('caseType' => 'EPA', 'notifiedRelatives' => array(), 'notifiedAttorneys' => array(), 'epaDonorSignatureDate' => null, 'donorHasOtherEpas' => false, 'otherEpaInfo' => null, 'donor' => array('id' => null, 'uId' => null, 'normalizedUid' => null, 'documents' => array(), 'notes' => array(), 'tasks' => array(), 'inputFilter' => null, 'errorMessages' => array(), 'warnings' => array()), 'correspondent' => null, 'applicants' => array(), 'attorneys' => array(), 'notifiedPersons' => array(), 'usesNotifiedPersons' => false, 'noNoticeGiven' => false, 'notifiedPersonPermissionBy' => 1, 'certificateProviders' => array(), 'paymentByDebitCreditCard' => 0, 'paymentByCheque' => 0, 'wouldLikeToApplyForFeeRemission' => 0, 'haveAppliedForFeeRemission' => 0, 'caseAttorneySingular' => false, 'caseAttorneyJointlyAndSeverally' => false, 'caseAttorneyJointly' => false, 'caseAttorneyJointlyAndJointlyAndSeverally' => false, 'cardPaymentContact' => null, 'howAttorneysAct' => null, 'howReplacementAttorneysAct' => null, 'attorneyActDecisions' => null, 'replacementAttorneyActDecisions' => null, 'replacementOrder' => null, 'additionalInfo' => null, 'paymentId' => null, 'paymentAmount' => null, 'paymentDate' => null, 'paymentRemission' => 0, 'paymentExemption' => 0, 'attorneyPartyDeclaration' => 1, 'attorneyApplicationAssertion' => 1, 'attorneyMentalActPermission' => 1, 'attorneyDeclarationSignatureDate' => null, 'attorneyDeclarationSignatoryFullName' => null, 'correspondentComplianceAssertion' => 1, 'notificationDate' => null, 'dispatchDate' => null, 'noticeGivenDate' => null, 'applicantType' => null, 'cancellationDate' => null, 'id' => null, 'oldCaseId' => null, 'applicationType' => 0, 'title' => null, 'caseSubtype' => null, 'dueDate' => null, 'registrationDate' => null, 'closedDate' => null, 'status' => null, 'tasks' => array(), 'notes' => array(), 'documents' => array(), 'caseItems' => array(), 'taskStatus' => array(), 'ragRating' => null, 'ragTotal' => null, 'rejectedDate' => null, 'scheduledJobs' => array(), 'uId' => null, 'normalizedUid' => null, 'inputFilter' => null, 'errorMessages' => array(), 'assignee' => null, 'epaDonorNoticeGivenDate' => null, 'personNotifyDonor' => null, 'hasRelativeToNotice' => null, 'areAllAttorneysApplyingToRegister' => null, 'payments' => array(), 'applicantsDeclaration' => 1, 'applicantsDeclarationSignatureDate' => null, 'caseAttorneyActionAdditionalInfo' => false, 'applicationHasRestrictions' => false, 'applicationHasGuidance' => false, 'applicationHasCharges' => false, 'certificateProviderSignatureDate' => null, 'attorneyStatementDate' => null, 'signingOnBehalfDate' => null, 'signingOnBehalfFullName' => null, 'attorneyDeclarationSignatureWitness' => false, 'additionalInfoDonorSignature' => false, 'additionalInfoDonorSignatureDate' => null, 'anyOtherInfo' => false, 'warnings' => null, 'attorneyDeclarationSignature' => false, 'certificateProviderSignature' => false, 'repeatApplication' => false, 'repeatApplicationReference' => null), $epa->toArrayRecursive());
 }