summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/tests/keymanager.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2013-08-21 10:59:31 +0200
committerAndreas Fischer <bantu@owncloud.com>2013-08-21 11:01:24 +0200
commit83afb46205ef9b2235a4b978beed44267d3e6c81 (patch)
tree13f1aa5b088267fe914df633248551cc5f3c7d3d /apps/files_encryption/tests/keymanager.php
parent85ac9572ce4f43d1a87dfdfd898b17493f9f8539 (diff)
downloadnextcloud-server-83afb46205ef9b2235a4b978beed44267d3e6c81.tar.gz
nextcloud-server-83afb46205ef9b2235a4b978beed44267d3e6c81.zip
Use __DIR__ instead of dirname(__FILE__).
This is possible because we require PHP 5.3 or higher.
Diffstat (limited to 'apps/files_encryption/tests/keymanager.php')
-rw-r--r--apps/files_encryption/tests/keymanager.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/apps/files_encryption/tests/keymanager.php b/apps/files_encryption/tests/keymanager.php
index 308cdd40327..0fe9ce9ed59 100644
--- a/apps/files_encryption/tests/keymanager.php
+++ b/apps/files_encryption/tests/keymanager.php
@@ -6,15 +6,15 @@
* See the COPYING-README file.
*/
-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__ . '/../../../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;
@@ -57,11 +57,11 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase {
function setUp() {
// 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->dataUrl = __DIR__ . '/../lib/crypt.php';
+ $this->legacyData = __DIR__ . '/legacy-text.txt';
+ $this->legacyEncryptedData = __DIR__ . '/legacy-encrypted-text.txt';
$this->randomKey = Encryption\Crypt::generateKey();
$keypair = Encryption\Crypt::createKeypair();