Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:gallery/gallery3
Browse files Browse the repository at this point in the history
  • Loading branch information
jhilden committed Aug 29, 2009
2 parents 746609b + 27b8125 commit 22c7f44
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion modules/comment/helpers/comment.php
Expand Up @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions modules/gallery/tests/Item_Model_Test.php
Expand Up @@ -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();
Expand All @@ -33,7 +33,7 @@ private function create_random_item() {
}

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();
Expand All @@ -47,7 +47,7 @@ public function updating_doesnt_change_created_date_test() {
}

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);

Expand All @@ -64,7 +64,7 @@ public function updating_view_count_only_doesnt_change_updated_date_test() {

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");
Expand Down Expand Up @@ -128,7 +128,7 @@ public function move_album_test() {

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() . "/";

Expand All @@ -142,7 +142,7 @@ public function item_rename_wont_accept_slash_test() {
}

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";
Expand Down

0 comments on commit 22c7f44

Please sign in to comment.