Navigation Menu

Skip to content

Commit

Permalink
Fix coding standards.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Mar 11, 2012
1 parent 7d256d0 commit 932c9d4
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
1 change: 0 additions & 1 deletion lib/Cake/Test/Case/Cache/CacheTest.php
Expand Up @@ -126,7 +126,6 @@ public function testInvalidConfig() {
$read = Cache::read('Test', 'invalid');
}


/**
* Test reading from a config that is undefined.
*
Expand Down
3 changes: 1 addition & 2 deletions lib/Cake/Test/Case/Cache/Engine/ApcEngineTest.php
Expand Up @@ -106,7 +106,7 @@ public function testExpiry() {
$result = Cache::read('other_test', 'apc');
$this->assertFalse($result);

Cache::set(array('duration' => 1), 'apc');
Cache::set(array('duration' => 1), 'apc');

$data = 'this is a test of the emergency broadcasting system';
$result = Cache::write('other_test', $data, 'apc');
Expand Down Expand Up @@ -157,7 +157,6 @@ public function testDecrement() {

$result = Cache::read('test_decrement', 'apc');
$this->assertEquals(2, $result);

}

/**
Expand Down
11 changes: 6 additions & 5 deletions lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php
Expand Up @@ -133,7 +133,7 @@ public function testExpiry() {
$result = Cache::read('other_test', 'file_test');
$this->assertFalse($result);

Cache::set(array('duration' => "+1 second"), 'file_test');
Cache::set(array('duration' => "+1 second"), 'file_test');

$data = 'this is a test of the emergency broadcasting system';
$result = Cache::write('other_test', $data, 'file_test');
Expand Down Expand Up @@ -362,34 +362,35 @@ public function testMaskSetting() {
Cache::config('mask_test', array('engine' => 'File', 'path' => TMP . 'tests'));
$data = 'This is some test content';
$write = Cache::write('masking_test', $data, 'mask_test');
$result = substr(sprintf('%o',fileperms(TMP . 'tests' . DS .'cake_masking_test')), -4);
$result = substr(sprintf('%o',fileperms(TMP . 'tests' . DS . 'cake_masking_test')), -4);
$expected = '0664';
$this->assertEquals($expected, $result);
Cache::delete('masking_test', 'mask_test');
Cache::drop('mask_test');

Cache::config('mask_test', array('engine' => 'File', 'mask' => 0666, 'path' => TMP . 'tests'));
$write = Cache::write('masking_test', $data, 'mask_test');
$result = substr(sprintf('%o',fileperms(TMP . 'tests' . DS .'cake_masking_test')), -4);
$result = substr(sprintf('%o',fileperms(TMP . 'tests' . DS . 'cake_masking_test')), -4);
$expected = '0666';
$this->assertEquals($expected, $result);
Cache::delete('masking_test', 'mask_test');
Cache::drop('mask_test');

Cache::config('mask_test', array('engine' => 'File', 'mask' => 0644, 'path' => TMP . 'tests'));
$write = Cache::write('masking_test', $data, 'mask_test');
$result = substr(sprintf('%o',fileperms(TMP . 'tests' . DS .'cake_masking_test')), -4);
$result = substr(sprintf('%o',fileperms(TMP . 'tests' . DS . 'cake_masking_test')), -4);
$expected = '0644';
$this->assertEquals($expected, $result);
Cache::delete('masking_test', 'mask_test');
Cache::drop('mask_test');

Cache::config('mask_test', array('engine' => 'File', 'mask' => 0640, 'path' => TMP . 'tests'));
$write = Cache::write('masking_test', $data, 'mask_test');
$result = substr(sprintf('%o',fileperms(TMP . 'tests' . DS .'cake_masking_test')), -4);
$result = substr(sprintf('%o',fileperms(TMP . 'tests' . DS . 'cake_masking_test')), -4);
$expected = '0640';
$this->assertEquals($expected, $result);
Cache::delete('masking_test', 'mask_test');
Cache::drop('mask_test');
}

}
4 changes: 3 additions & 1 deletion lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php
Expand Up @@ -21,6 +21,7 @@
App::uses('MemcacheEngine', 'Cache/Engine');

class TestMemcacheEngine extends MemcacheEngine {

/**
* public accessor to _parseServerString
*
Expand All @@ -34,6 +35,7 @@ public function parseServerString($server) {
public function setMemcache($memcache) {
$this->_Memcache = $memcache;
}

}

/**
Expand Down Expand Up @@ -217,7 +219,7 @@ public function testExpiry() {
$result = Cache::read('other_test', 'memcache');
$this->assertFalse($result);

Cache::set(array('duration' => "+1 second"), 'memcache');
Cache::set(array('duration' => "+1 second"), 'memcache');

$data = 'this is a test of the emergency broadcasting system';
$result = Cache::write('other_test', $data, 'memcache');
Expand Down
3 changes: 1 addition & 2 deletions lib/Cake/Test/Case/Cache/Engine/WincacheEngineTest.php
Expand Up @@ -91,7 +91,7 @@ public function testExpiry() {
$result = Cache::read('other_test', 'wincache');
$this->assertFalse($result);

Cache::set(array('duration' => 1), 'wincache');
Cache::set(array('duration' => 1), 'wincache');

$data = 'this is a test of the emergency broadcasting system';
$result = Cache::write('other_test', $data, 'wincache');
Expand Down Expand Up @@ -145,7 +145,6 @@ public function testDecrement() {

$result = Cache::read('test_decrement', 'wincache');
$this->assertEquals(2, $result);

}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Cache/Engine/XcacheEngineTest.php
Expand Up @@ -111,7 +111,7 @@ public function testExpiry() {
$result = Cache::read('other_test');
$this->assertFalse($result);

Cache::set(array('duration' => "+1 second"));
Cache::set(array('duration' => "+1 second"));

$data = 'this is a test of the emergency broadcasting system';
$result = Cache::write('other_test', $data);
Expand Down

0 comments on commit 932c9d4

Please sign in to comment.