public function test_delete_parent() { $album_image_comment_id = self::$album_image_comment->id; $album_image_comment = Model_AlbumImageComment::find($album_image_comment_id); if (!\Util_Orm::get_count_all('\\Album\\Model_AlbumImageCommentLike', array('album_image_comment_id' => $album_image_comment_id))) { self::execute_like($album_image_comment_id, 6); self::execute_like($album_image_comment_id, 7); } $album_image_comment->delete(); $like_count = \Util_Orm::get_count_all('\\Album\\Model_AlbumImageCommentLike', array('album_image_comment_id' => $album_image_comment_id)); $this->assertEquals(0, $like_count); }