diff options
Diffstat (limited to 'modules/simpletest')
-rw-r--r-- | modules/simpletest/tests/batch_test.module | 2 | ||||
-rw-r--r-- | modules/simpletest/tests/file.test | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/modules/simpletest/tests/batch_test.module b/modules/simpletest/tests/batch_test.module index 03938aaa8..c581eabb3 100644 --- a/modules/simpletest/tests/batch_test.module +++ b/modules/simpletest/tests/batch_test.module @@ -466,7 +466,7 @@ function batch_test_stack($data = NULL, $reset = FALSE) { if ($reset) { variable_del('batch_test_stack'); } - if (is_null($data)) { + if (!isset($data)) { return variable_get('batch_test_stack', array()); } $stack = variable_get('batch_test_stack', array()); diff --git a/modules/simpletest/tests/file.test b/modules/simpletest/tests/file.test index afb540eb6..55fc1deb7 100644 --- a/modules/simpletest/tests/file.test +++ b/modules/simpletest/tests/file.test @@ -174,7 +174,7 @@ class FileTestCase extends DrupalWebTestCase { */ function createDirectory($path = NULL) { // A directory to operate on. - if (is_null($path)) { + if (!isset($path)) { $path = file_default_scheme() . '://' . $this->randomName(); } $this->assertTrue(drupal_mkdir($path) && is_dir($path), t('Directory was created successfully.')); @@ -198,12 +198,12 @@ class FileTestCase extends DrupalWebTestCase { * File object. */ function createFile($filepath = NULL, $contents = NULL, $scheme = 'public') { - if (is_null($filepath)) { + if (!isset($filepath)) { $filepath = $this->randomName(); } $filepath = $scheme . '://' . $filepath; - if (is_null($contents)) { + if (!isset($contents)) { $contents = "file_put_contents() doesn't seem to appreciate empty strings so let's put in some data."; } @@ -282,7 +282,7 @@ class FileHookTestCase extends FileTestCase { function assertFileHookCalled($hook, $expected_count = 1, $message = NULL) { $actual_count = count(file_test_get_calls($hook)); - if (is_null($message)) { + if (!isset($message)) { if ($actual_count == $expected_count) { $message = t('hook_file_@name was called correctly.', array('@name' => $hook)); } |