Exemplo n.º 1
0
 public function testAddArrayAddsChildren()
 {
     $tracker = new Tracker();
     $tracker->add($array = array($objectA = new \stdClass(), $objectB = new \stdClass()));
     $this->assertTrue($tracker->has($objectA));
     $this->assertTrue($tracker->has($objectB));
     $this->assertFalse($tracker->has($array));
 }
Exemplo n.º 2
0
 /**
  * @param Envelope $envelope
  *
  * @throws ApiException If the DigiDoc envelope is not merged
  */
 private function failIfNotMerged(Envelope $envelope)
 {
     if (!$this->tracker->has($envelope)) {
         throw ApiException::createNotMerged($envelope);
     }
 }