public function testBusinessAreaRequestClass()
 {
     $address = new Address();
     $address->street = "Sv. Mateja";
     $address->houseNumber = "19";
     $address->zipCode = "10000";
     $address->settlement = "Zagreb";
     $address->city = "Zagreb";
     $addressData = new AddressData();
     $addressData->setAddress($address);
     $businessArea = new BusinessArea();
     $businessArea->setAddressData($addressData);
     $date = Carbon::now()->format("d.m.Y");
     $businessArea->setDateOfusage($date);
     $businessArea->setNoteOfBusinessArea("ODV1");
     //$businessArea->setNoteOfClosing("Z");
     $businessArea->setOib("32314900695");
     $businessArea->setSpecificPurpose("spec namjena");
     $businessArea->setWorkingTime("Pon:08-11h Uto:15-17");
     $businessAreaRequest = new BusinessAreaRequest($businessArea);
     $xml = new DOMDocument();
     $xml->loadXML($businessAreaRequest->toXML());
     $res = $xml->schemaValidate('./src/schema/FiskalizacijaSchema.xsd');
     $this->assertTrue($res);
 }
Пример #2
0
 public function testBusinessAreaClass()
 {
     $address = new Address();
     $address->street = "Sv. Mateja";
     $address->houseNumber = "19";
     $address->extrahouseNumber = "-";
     $address->zipCode = "10000";
     $address->settlement = "Zagreb";
     $address->city = "Zagreb";
     $addressData = new AddressData();
     $addressData->setAddress($address);
     $businessArea = new BusinessArea();
     $businessArea->setAddressData($addressData);
     $businessArea->setDateOfusage('13.07.2014');
     $businessArea->setNoteOfBusinessArea("ODV1");
     $businessArea->setNoteOfClosing("Z");
     $businessArea->setOib("32314900695");
     $businessArea->setSpecificPurpose("spec namjena");
     $businessArea->setWorkingTime("Pon:08-11h Uto:15-17");
     $res = $businessArea->toXML();
     $this->assertStringEqualsFile('./tests/xml/address_area.xml', $res);
 }
Пример #3
0
 public function setBusinessAreaRequest()
 {
     $address = new Address();
     $address->street = "Sv. Mateja";
     $address->houseNumber = "19";
     $address->zipCode = "10000";
     $address->settlement = "Zagreb";
     $address->city = "Zagreb";
     $addressData = new AddressData();
     $addressData->setAddress($address);
     $businessArea = new BusinessArea();
     $businessArea->setAddressData($addressData);
     $date = Carbon::now()->format("d.m.Y");
     $businessArea->setDateOfusage($date);
     $businessArea->setNoteOfBusinessArea("ODV1");
     //$businessArea->setNoteOfClosing("Z");
     $businessArea->setOib("32314900695");
     $businessArea->setSpecificPurpose("spec namjena");
     $businessArea->setWorkingTime("Pon:08-11h Uto:15-17");
     $businessAreaRequest = new BusinessAreaRequest($businessArea);
     return $businessAreaRequest;
 }