private function addFiles(Session $session, $files) { foreach ($files as $file) { // Skips already tracked files, because they're already added. if ($this->tracker->has($file)) { continue; } $this->call('addDataFile', array($session->getId(), $file->getName(), $file->getMimeType(), self::CONTENT_TYPE_EMBEDDED, $file->getSize(), '', '', $this->encoder->encode($file->getContent()))); $this->tracker->add($file); } return $this; }
public function testDecodeConcatsFromNewlines() { $text = "YWFh\nYWFh"; $encoder = new Encoder(); $this->assertEquals('aaaaaa', $encoder->decode($text)); }