Permalink
Browse files

Test case compatibility skipUnless() to markTestSkipped()

  • Loading branch information...
shama authored and markstory committed Nov 16, 2011
1 parent c97dca1 commit 99793fd65409bd9fd7d836feca70f79f88addb8e
@@ -621,7 +621,9 @@ public function testLogError() {
* @return void
*/
public function testFileExistsInPath() {
$this->skipUnless(function_exists('ini_set'), '%s ini_set function not available');
if (!function_exists('ini_set')) {
$this->markTestSkipped('%s ini_set function not available');
}
$_includePath = ini_get('include_path');
@@ -957,7 +959,9 @@ public function testStripslashesDeep() {
* @return void
*/
public function testStripslashesDeepSybase() {
$this->skipUnless(ini_get('magic_quotes_sybase') === '1', 'magic_quotes_sybase is off');
if (!(ini_get('magic_quotes_sybase') === '1')) {
$this->markTestSkipped('magic_quotes_sybase is off');
}
$this->assertEquals(stripslashes_deep("tes\'t"), "tes\'t");
@@ -32,7 +32,9 @@ class XcacheEngineTest extends CakeTestCase {
* @return void
*/
public function setUp() {
$this->skipUnless(function_exists('xcache_set'), 'Xcache is not installed or configured properly');
if (!function_exists('xcache_set')) {
$this->markTestSkipped('Xcache is not installed or configured properly');
}
$this->_cacheDisable = Configure::read('Cache.disable');
Configure::write('Cache.disable', false);
Cache::config('xcache', array('engine' => 'Xcache', 'prefix' => 'cake_'));
@@ -642,7 +642,9 @@ public function testRequestWithResource() {
$this->Socket->connected = true;
$f = fopen(TMP . 'download.txt', 'w');
$this->skipUnless($f, 'Can not write in TMP directory.');
if (!$f) {
$this->markTestSkipped('Can not write in TMP directory.');
}
$this->Socket->setContentResource($f);
$result = (string)$this->Socket->request('http://www.cakephp.org/');
@@ -64,7 +64,9 @@ class CacheHelperTest extends CakeTestCase {
* @return void
*/
public function skip() {
$this->skipUnless(is_writable(TMP . 'cache' . DS . 'views' . DS), 'TMP/views is not writable %s');
if (!is_writable(TMP . 'cache' . DS . 'views' . DS)) {
$this->markTestSkipped('TMP/views is not writable %s');
}
}
/**
* setUp method

0 comments on commit 99793fd

Please sign in to comment.