splitMultiMessage() 공개 정적인 메소드

Split multi messages to separate messages
public static splitMultiMessage ( $ediMessage ) : array
$ediMessage string
리턴 array
예제 #1
0
 public function testSplitMultiMessage()
 {
     $multiEdi = file_get_contents(__DIR__ . "/../files/exampleMulti.edi");
     $eddies = Reader::splitMultiMessage($multiEdi);
     $this->assertEquals(2, count($eddies));
     $r = new Reader($eddies[0]);
     $messageType = $r->readUNHmessageType();
     $this->assertEquals('PAORES', $messageType);
     $r = new Reader($eddies[1]);
     $messageType = $r->readUNHmessageType();
     $this->assertEquals('PAORES', $messageType);
 }