summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorjhilden <jakobhilden@gmail.com>2009-08-29 14:29:54 -0400
committerjhilden <jakobhilden@gmail.com>2009-08-29 14:29:54 -0400
commit22c7f44d0bfce250c3b70bcc0d3b7de9e02a7daf (patch)
treef9e921c072aeb8f17d17af8cc89e57340aca067a /modules
parent746609b967532a6570a229d5b1e2997527316305 (diff)
parent27b81257fa3b65de555111372648a65e7152633a (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules')
-rw-r--r--modules/comment/helpers/comment.php2
-rw-r--r--modules/gallery/tests/Item_Model_Test.php14
2 files changed, 8 insertions, 8 deletions
diff --git a/modules/comment/helpers/comment.php b/modules/comment/helpers/comment.php
index 3d743325..f74a8644 100644
--- a/modules/comment/helpers/comment.php
+++ b/modules/comment/helpers/comment.php
@@ -35,7 +35,7 @@ class comment_Core {
* @return Comment_Model
*/
static function create($item, $author, $text, $guest_name=null,
- $guest_email=ull, $guest_url=null) {
+ $guest_email=null, $guest_url=null) {
$comment = ORM::factory("comment");
$comment->author_id = $author->id;
$comment->guest_email = $guest_email;
diff --git a/modules/gallery/tests/Item_Model_Test.php b/modules/gallery/tests/Item_Model_Test.php
index 0940d076..585e247c 100644
--- a/modules/gallery/tests/Item_Model_Test.php
+++ b/modules/gallery/tests/Item_Model_Test.php
@@ -19,12 +19,12 @@
*/
class Item_Model_Test extends Unit_Test_Case {
public function saving_sets_created_and_updated_dates_test() {
- $item = self::create_random_item();
+ $item = self::_create_random_item();
$this->assert_true(!empty($item->created));
$this->assert_true(!empty($item->updated));
}
- private function create_random_item() {
+ private static function _create_random_item() {
$item = ORM::factory("item");
/* Set all required fields (values are irrelevant) */
$item->name = rand();
@@ -33,7 +33,7 @@ class Item_Model_Test extends Unit_Test_Case {
}
public function updating_doesnt_change_created_date_test() {
- $item = self::create_random_item();
+ $item = self::_create_random_item();
// Force the creation date to something well known
$db = Database::instance();
@@ -47,7 +47,7 @@ class Item_Model_Test extends Unit_Test_Case {
}
public function updating_view_count_only_doesnt_change_updated_date_test() {
- $item = self::create_random_item();
+ $item = self::_create_random_item();
$item->reload();
$this->assert_same(0, $item->view_count);
@@ -64,7 +64,7 @@ class Item_Model_Test extends Unit_Test_Case {
public function move_photo_test() {
// Create a test photo
- $item = self::create_random_item();
+ $item = self::_create_random_item();
file_put_contents($item->thumb_path(), "thumb");
file_put_contents($item->resize_path(), "resize");
@@ -128,7 +128,7 @@ class Item_Model_Test extends Unit_Test_Case {
public function item_rename_wont_accept_slash_test() {
// Create a test photo
- $item = self::create_random_item();
+ $item = self::_create_random_item();
$new_name = rand() . "/";
@@ -142,7 +142,7 @@ class Item_Model_Test extends Unit_Test_Case {
}
public function save_original_values_test() {
- $item = $this->create_random_item();
+ $item = self::_create_random_item();
$item->title = "ORIGINAL_VALUE";
$item->save();
$item->title = "NEW_VALUE";