diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-08-22 12:50:31 +0400 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-08-22 12:50:31 +0400 |
commit | 582b33bdf15ecd9b29fee721167dfaee95aea854 (patch) | |
tree | 012852c03c17a1013a50b1471d9cf22f6aa2ca2b /apps/files_encryption/tests/crypt.php | |
parent | fbc23c4a01e8d900fb057393a6ffaba77ab35ddc (diff) | |
parent | 83afb46205ef9b2235a4b978beed44267d3e6c81 (diff) |
Merge pull request #4537 from owncloud/no-realpath
Do not use realpath() on includes.
Diffstat (limited to 'apps/files_encryption/tests/crypt.php')
-rwxr-xr-x | apps/files_encryption/tests/crypt.php | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php index 630b50481e5..5146613e252 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 realpath(dirname(__FILE__) . '/../3rdparty/Crypt_Blowfish/Blowfish.php'); -require_once realpath(dirname(__FILE__) . '/../../../lib/base.php'); -require_once realpath(dirname(__FILE__) . '/../lib/crypt.php'); -require_once realpath(dirname(__FILE__) . '/../lib/keymanager.php'); -require_once realpath(dirname(__FILE__) . '/../lib/proxy.php'); -require_once realpath(dirname(__FILE__) . '/../lib/stream.php'); -require_once realpath(dirname(__FILE__) . '/../lib/util.php'); -require_once realpath(dirname(__FILE__) . '/../lib/helper.php'); -require_once realpath(dirname(__FILE__) . '/../appinfo/app.php'); -require_once realpath(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(realpath(dirname(__FILE__) . '/../lib/crypt.php')); + $this->dataLong = file_get_contents(__DIR__ . '/../lib/crypt.php'); $this->dataShort = 'hats'; - $this->dataUrl = realpath(dirname(__FILE__) . '/../lib/crypt.php'); - $this->legacyData = realpath(dirname(__FILE__) . '/legacy-text.txt'); - $this->legacyEncryptedData = realpath(dirname(__FILE__) . '/legacy-encrypted-text.txt'); - $this->legacyEncryptedDataKey = realpath(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(); |