* @param string $checksum
*/
public function userUploadsFileToWithChecksum($user, $source, $destination, $checksum) {
- $file = \GuzzleHttp\Psr7\stream_for(fopen($source, 'r'));
+ $file = \GuzzleHttp\Psr7\Utils::streamFor(fopen($source, 'r'));
try {
$this->response = $this->client->put(
$this->baseUrl . '/remote.php/webdav' . $destination,
* @param string $destination
*/
public function userUploadsAFileTo($user, $source, $destination) {
- $file = \GuzzleHttp\Psr7\stream_for(fopen($source, 'r'));
+ $file = \GuzzleHttp\Psr7\Utils::streamFor(fopen($source, 'r'));
try {
$this->response = $this->makeDavRequest($user, "PUT", $destination, [], $file);
} catch (\GuzzleHttp\Exception\ServerException $e) {
* @When User :user uploads file with content :content to :destination
*/
public function userUploadsAFileWithContentTo($user, $content, $destination) {
- $file = \GuzzleHttp\Psr7\stream_for($content);
+ $file = \GuzzleHttp\Psr7\Utils::streamFor($content);
try {
$this->response = $this->makeDavRequest($user, "PUT", $destination, [], $file);
} catch (\GuzzleHttp\Exception\ServerException $e) {
*/
public function userUploadsChunkFileOfWithToWithChecksum($user, $num, $total, $data, $destination) {
$num -= 1;
- $data = \GuzzleHttp\Psr7\stream_for($data);
+ $data = \GuzzleHttp\Psr7\Utils::streamFor($data);
$file = $destination . '-chunking-42-' . $total . '-' . $num;
$this->makeDavRequest($user, 'PUT', $file, ['OC-Chunked' => '1'], $data, "uploads");
}
* @Given user :user uploads new chunk file :num with :data to id :id
*/
public function userUploadsNewChunkFileOfWithToId($user, $num, $data, $id) {
- $data = \GuzzleHttp\Psr7\stream_for($data);
+ $data = \GuzzleHttp\Psr7\Utils::streamFor($data);
$destination = '/uploads/' . $user . '/' . $id . '/' . $num;
$this->makeDavRequest($user, 'PUT', $destination, [], $data, "uploads");
}