[Pkg-owncloud-commits] [php-sabredav] 24/75: Update tests according to the previous commit.
David Prévot
taffit at moszumanska.debian.org
Thu Feb 26 18:51:50 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabredav.
commit 70a996499fde911d02baad8750bd46dbe488fef1
Author: Ivan Enderlin <ivan.enderlin at hoa-project.net>
Date: Fri Nov 21 11:47:13 2014 +0100
Update tests according to the previous commit.
---
tests/Sabre/DAV/FSExt/FileTest.php | 2 +-
tests/Sabre/DAV/FSExt/ServerTest.php | 4 ++--
tests/Sabre/DAV/Locks/PluginTest.php | 2 +-
tests/Sabre/DAV/ServerRangeTest.php | 14 +++++++-------
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/tests/Sabre/DAV/FSExt/FileTest.php b/tests/Sabre/DAV/FSExt/FileTest.php
index 8947c66..444e39d 100644
--- a/tests/Sabre/DAV/FSExt/FileTest.php
+++ b/tests/Sabre/DAV/FSExt/FileTest.php
@@ -74,7 +74,7 @@ class FileTest extends \PHPUnit_Framework_TestCase {
function testGetETag() {
$file = new File(SABRE_TEMPDIR . '/file.txt');
- $this->assertEquals('"' . md5('Contents') . '"',$file->getETag());
+ $this->assertEquals('"' . sha1(filemtime(SABRE_TEMPDIR . '/file.txt')) . '"',$file->getETag());
}
diff --git a/tests/Sabre/DAV/FSExt/ServerTest.php b/tests/Sabre/DAV/FSExt/ServerTest.php
index 18ada07..1206d9d 100644
--- a/tests/Sabre/DAV/FSExt/ServerTest.php
+++ b/tests/Sabre/DAV/FSExt/ServerTest.php
@@ -27,7 +27,7 @@ class ServerTest extends DAV\AbstractServer{
'Content-Type' => ['application/octet-stream'],
'Content-Length' => [13],
'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
- 'ETag' => ['"' .md5_file($this->tempDir . '/test.txt') . '"'],
+ 'ETag' => ['"' . sha1(filemtime($this->tempDir . '/test.txt')) . '"'],
],
$this->response->getHeaders()
);
@@ -48,7 +48,7 @@ class ServerTest extends DAV\AbstractServer{
'Content-Type' => ['application/octet-stream'],
'Content-Length' => [13],
'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
- 'ETag' => ['"' . md5_file($this->tempDir . '/test.txt') . '"'],
+ 'ETag' => ['"' . sha1(filemtime($this->tempDir . '/test.txt')) . '"'],
],
$this->response->getHeaders()
);
diff --git a/tests/Sabre/DAV/Locks/PluginTest.php b/tests/Sabre/DAV/Locks/PluginTest.php
index 5bd3cf7..a2eabd0 100644
--- a/tests/Sabre/DAV/Locks/PluginTest.php
+++ b/tests/Sabre/DAV/Locks/PluginTest.php
@@ -902,7 +902,7 @@ class PluginTest extends DAV\AbstractServer {
$tree = new DAV\Tree(new DAV\FSExt\Directory(SABRE_TEMPDIR));
$this->server->tree = $tree;
- $etag = md5(file_get_contents(SABRE_TEMPDIR . '/test.txt'));
+ $etag = sha1(filemtime(SABRE_TEMPDIR . '/test.txt'));
$serverVars = array(
'REQUEST_URI' => '/test.txt',
'REQUEST_METHOD' => 'PUT',
diff --git a/tests/Sabre/DAV/ServerRangeTest.php b/tests/Sabre/DAV/ServerRangeTest.php
index 859f481..9729b70 100644
--- a/tests/Sabre/DAV/ServerRangeTest.php
+++ b/tests/Sabre/DAV/ServerRangeTest.php
@@ -31,7 +31,7 @@ class ServerRangeTest extends AbstractServer{
'Content-Length' => [4],
'Content-Range' => ['bytes 2-5/13'],
'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
- 'ETag' => ['"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')). '"'],
+ 'ETag' => ['"' . sha1(filemtime(SABRE_TEMPDIR . '/test.txt')) . '"'],
),
$this->response->getHeaders()
);
@@ -62,7 +62,7 @@ class ServerRangeTest extends AbstractServer{
'Content-Length' => [11],
'Content-Range' => ['bytes 2-12/13'],
'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
- 'ETag' => ['"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')) . '"'],
+ 'ETag' => ['"' . sha1(filemtime(SABRE_TEMPDIR . '/test.txt')) . '"'],
),
$this->response->getHeaders()
);
@@ -93,7 +93,7 @@ class ServerRangeTest extends AbstractServer{
'Content-Length' => [8],
'Content-Range' => ['bytes 5-12/13'],
'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
- 'ETag' => ['"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')). '"'],
+ 'ETag' => ['"' . sha1(filemtime(SABRE_TEMPDIR . '/test.txt')). '"'],
),
$this->response->getHeaders()
);
@@ -165,7 +165,7 @@ class ServerRangeTest extends AbstractServer{
'Content-Length' => [4],
'Content-Range' => ['bytes 2-5/13'],
'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
- 'ETag' => ['"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')) . '"'],
+ 'ETag' => ['"' . sha1(filemtime(SABRE_TEMPDIR . '/test.txt')) . '"'],
),
$this->response->getHeaders()
);
@@ -198,7 +198,7 @@ class ServerRangeTest extends AbstractServer{
'Content-Type' => ['application/octet-stream'],
'Content-Length' => [13],
'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
- 'ETag' => ['"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')) . '"'],
+ 'ETag' => ['"' . sha1(filemtime(SABRE_TEMPDIR . '/test.txt')) . '"'],
),
$this->response->getHeaders()
);
@@ -232,7 +232,7 @@ class ServerRangeTest extends AbstractServer{
'Content-Length' => [4],
'Content-Range' => ['bytes 2-5/13'],
'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
- 'ETag' => ['"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')) . '"'],
+ 'ETag' => ['"' . sha1(filemtime(SABRE_TEMPDIR . '/test.txt')) . '"'],
),
$this->response->getHeaders()
);
@@ -265,7 +265,7 @@ class ServerRangeTest extends AbstractServer{
'Content-Type' => ['application/octet-stream'],
'Content-Length' => [13],
'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
- 'ETag' => ['"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')) . '"'],
+ 'ETag' => ['"' . sha1(filemtime(SABRE_TEMPDIR . '/test.txt')) . '"'],
),
$this->response->getHeaders()
);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list