aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/files/cache/scanner.php
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2014-02-27 09:51:26 +0100
committerJörn Friedrich Dreyer <jfd@butonic.de>2014-02-27 09:51:26 +0100
commit131c12ad8d51c4a0acad03299bd617907c9f1d66 (patch)
treed9196295b4b6447a5aca23aee82e795440da2a7a /tests/lib/files/cache/scanner.php
parent39f2f564a99ebe719748f349aafe92ed9910bc0b (diff)
downloadnextcloud-server-131c12ad8d51c4a0acad03299bd617907c9f1d66.tar.gz
nextcloud-server-131c12ad8d51c4a0acad03299bd617907c9f1d66.zip
use assertInternalType for typechecking
Diffstat (limited to 'tests/lib/files/cache/scanner.php')
-rw-r--r--tests/lib/files/cache/scanner.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/lib/files/cache/scanner.php b/tests/lib/files/cache/scanner.php
index 9df98c36fa8..5182fac8b10 100644
--- a/tests/lib/files/cache/scanner.php
+++ b/tests/lib/files/cache/scanner.php
@@ -150,8 +150,8 @@ class Scanner extends \PHPUnit_Framework_TestCase {
$this->cache->put('folder', array('mtime' => $this->storage->filemtime('folder'), 'storage_mtime' => $this->storage->filemtime('folder')));
$this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW, \OC\Files\Cache\Scanner::REUSE_SIZE);
$newData = $this->cache->get('');
- $this->assertTrue(is_string($oldData['etag']), 'Expected a string');
- $this->assertTrue(is_string($newData['etag']), 'Expected a string');
+ $this->assertInternalType('string', $oldData['etag']);
+ $this->assertInternalType('string', $newData['etag']);
$this->assertNotSame($oldData['etag'], $newData['etag']);
$this->assertEquals($oldData['size'], $newData['size']);
@@ -219,11 +219,11 @@ class Scanner extends \PHPUnit_Framework_TestCase {
// manipulate etag to simulate an empty etag
$this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW, \OC\Files\Cache\Scanner::REUSE_ETAG);
$data0 = $this->cache->get('folder/bar.txt');
- $this->assertTrue(is_string($data0['etag']), 'Expected a string');
+ $this->assertInternalType('string', $data0['etag']);
$data1 = $this->cache->get('folder');
- $this->assertTrue(is_string($data1['etag']), 'Expected a string');
+ $this->assertInternalType('string', $data1['etag']);
$data2 = $this->cache->get('');
- $this->assertTrue(is_string($data2['etag']), 'Expected a string');
+ $this->assertInternalType('string', $data2['etag']);
$data0['etag'] = '';
$this->cache->put('folder/bar.txt', $data0);
@@ -232,15 +232,15 @@ class Scanner extends \PHPUnit_Framework_TestCase {
// verify cache content
$newData0 = $this->cache->get('folder/bar.txt');
- $this->assertTrue(is_string($newData0['etag']), 'Expected a string');
+ $this->assertInternalType('string', $newData0['etag']);
$this->assertNotEmpty($newData0['etag']);
$newData1 = $this->cache->get('folder');
- $this->assertTrue(is_string($newData1['etag']), 'Expected a string');
+ $this->assertInternalType('string', $newData1['etag']);
$this->assertNotSame($data1['etag'], $newData1['etag']);
$newData2 = $this->cache->get('');
- $this->assertTrue(is_string($newData2['etag']), 'Expected a string');
+ $this->assertInternalType('string', $newData2['etag']);
$this->assertNotSame($data2['etag'], $newData2['etag']);
}
}