Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2013-08-21 12:59:31 +0400
committerAndreas Fischer <bantu@owncloud.com>2013-08-21 13:01:24 +0400
commit83afb46205ef9b2235a4b978beed44267d3e6c81 (patch)
tree13f1aa5b088267fe914df633248551cc5f3c7d3d /apps/files_encryption/tests/crypt.php
parent85ac9572ce4f43d1a87dfdfd898b17493f9f8539 (diff)
Use __DIR__ instead of dirname(__FILE__).
This is possible because we require PHP 5.3 or higher.
Diffstat (limited to 'apps/files_encryption/tests/crypt.php')
-rwxr-xr-xapps/files_encryption/tests/crypt.php30
1 files changed, 15 insertions, 15 deletions
diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php
index 188606ee1c5..f73647d8af5 100755
--- a/apps/files_encryption/tests/crypt.php
+++ b/apps/files_encryption/tests/crypt.php
@@ -7,16 +7,16 @@
* See the COPYING-README file.
*/
-require_once dirname(__FILE__) . '/../3rdparty/Crypt_Blowfish/Blowfish.php';
-require_once dirname(__FILE__) . '/../../../lib/base.php';
-require_once dirname(__FILE__) . '/../lib/crypt.php';
-require_once dirname(__FILE__) . '/../lib/keymanager.php';
-require_once dirname(__FILE__) . '/../lib/proxy.php';
-require_once dirname(__FILE__) . '/../lib/stream.php';
-require_once dirname(__FILE__) . '/../lib/util.php';
-require_once dirname(__FILE__) . '/../lib/helper.php';
-require_once dirname(__FILE__) . '/../appinfo/app.php';
-require_once dirname(__FILE__) . '/util.php';
+require_once __DIR__ . '/../3rdparty/Crypt_Blowfish/Blowfish.php';
+require_once __DIR__ . '/../../../lib/base.php';
+require_once __DIR__ . '/../lib/crypt.php';
+require_once __DIR__ . '/../lib/keymanager.php';
+require_once __DIR__ . '/../lib/proxy.php';
+require_once __DIR__ . '/../lib/stream.php';
+require_once __DIR__ . '/../lib/util.php';
+require_once __DIR__ . '/../lib/helper.php';
+require_once __DIR__ . '/../appinfo/app.php';
+require_once __DIR__ . '/util.php';
use OCA\Encryption;
@@ -67,12 +67,12 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
$this->pass = \Test_Encryption_Crypt::TEST_ENCRYPTION_CRYPT_USER1;
// set content for encrypting / decrypting in tests
- $this->dataLong = file_get_contents(dirname(__FILE__) . '/../lib/crypt.php');
+ $this->dataLong = file_get_contents(__DIR__ . '/../lib/crypt.php');
$this->dataShort = 'hats';
- $this->dataUrl = dirname(__FILE__) . '/../lib/crypt.php';
- $this->legacyData = dirname(__FILE__) . '/legacy-text.txt';
- $this->legacyEncryptedData = dirname(__FILE__) . '/legacy-encrypted-text.txt';
- $this->legacyEncryptedDataKey = dirname(__FILE__) . '/encryption.key';
+ $this->dataUrl = __DIR__ . '/../lib/crypt.php';
+ $this->legacyData = __DIR__ . '/legacy-text.txt';
+ $this->legacyEncryptedData = __DIR__ . '/legacy-encrypted-text.txt';
+ $this->legacyEncryptedDataKey = __DIR__ . '/encryption.key';
$this->randomKey = Encryption\Crypt::generateKey();
$keypair = Encryption\Crypt::createKeypair();