public function testEncodeSplitsIntoMultipleLines() { $text = str_repeat('a', 96); $encoder = new Encoder(); $lines = explode("\n", trim($encoder->encode($text))); $this->assertCount(2, $lines); foreach ($lines as $line) { $this->assertEquals(64, strlen($line)); } }
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; }