assert_equal(VARPATH . "albums/$rand", $album->path()); $this->assert_equal(VARPATH . "thumbnails/$rand", $album->thumbnail_path()); $this->assert_equal(VARPATH . "thumbnails/$rand", $album->resize_path()); $this->assert_true(is_dir($album->path()), "missing path: {$album->path()}"); $this->assert_true(is_dir($album->resize_path()), "missing path: {$album->resize_path()}"); $this->assert_equal(1, $album->parent_id); // MPTT tests will cover other hierarchy checks $this->assert_equal($rand, $album->name); $this->assert_equal($rand, $album->title); $this->assert_equal($rand, $album->description); } public function create_conflicting_album_test() { $rand = rand(); $album1 = album::create(1, $rand, $rand, $rand); $album2 = album::create(1, $rand, $rand, $rand); $this->assert_true($album1->name != $album2->name); } }