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)); }
/** * @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); } }