Image to Post - Admin extension
This commit is contained in:
		
							parent
							
								
									840e661a42
								
							
						
					
					
						commit
						77ea8617d7
					
				@ -15,9 +15,9 @@ class AdminPageInfo extends ExtensionInfo
 | 
				
			|||||||
  <p>Lowercase all tags:
 | 
					  <p>Lowercase all tags:
 | 
				
			||||||
  <br>Set all tags to lowercase for consistency
 | 
					  <br>Set all tags to lowercase for consistency
 | 
				
			||||||
  <p>Recount tag use:
 | 
					  <p>Recount tag use:
 | 
				
			||||||
  <br>If the counts of images per tag get messed up somehow, this will reset them, and remove any unused tags
 | 
					  <br>If the counts of posts per tag get messed up somehow, this will reset them, and remove any unused tags
 | 
				
			||||||
  <p>Database dump:
 | 
					  <p>Database dump:
 | 
				
			||||||
  <br>Download the contents of the database in plain text format, useful for backups.
 | 
					  <br>Download the contents of the database in plain text format, useful for backups.
 | 
				
			||||||
  <p>Image dump:
 | 
					  <p>Post dump:
 | 
				
			||||||
  <br>Download all the images as a .zip file (Requires ZipArchive)";
 | 
					  <br>Download all the posts as a .zip file (Requires ZipArchive)";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -28,14 +28,14 @@ class AdminPageTest extends ShimmiePHPUnitTestCase
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        // Validate problem
 | 
					        // Validate problem
 | 
				
			||||||
        $page = $this->get_page("post/view/$image_id_1");
 | 
					        $page = $this->get_page("post/view/$image_id_1");
 | 
				
			||||||
        $this->assertEquals("Image $image_id_1: TeStCase$ts", $page->title);
 | 
					        $this->assertEquals("Post $image_id_1: TeStCase$ts", $page->title);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Fix
 | 
					        // Fix
 | 
				
			||||||
        send_event(new AdminActionEvent('lowercase_all_tags'));
 | 
					        send_event(new AdminActionEvent('lowercase_all_tags'));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Validate fix
 | 
					        // Validate fix
 | 
				
			||||||
        $this->get_page("post/view/$image_id_1");
 | 
					        $this->get_page("post/view/$image_id_1");
 | 
				
			||||||
        $this->assert_title("Image $image_id_1: testcase$ts");
 | 
					        $this->assert_title("Post $image_id_1: testcase$ts");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Change
 | 
					        // Change
 | 
				
			||||||
        $_POST["tag"] = "TestCase$ts";
 | 
					        $_POST["tag"] = "TestCase$ts";
 | 
				
			||||||
@ -43,7 +43,7 @@ class AdminPageTest extends ShimmiePHPUnitTestCase
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        // Validate change
 | 
					        // Validate change
 | 
				
			||||||
        $this->get_page("post/view/$image_id_1");
 | 
					        $this->get_page("post/view/$image_id_1");
 | 
				
			||||||
        $this->assert_title("Image $image_id_1: TestCase$ts");
 | 
					        $this->assert_title("Post $image_id_1: TestCase$ts");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # FIXME: make sure the admin tools actually work
 | 
					    # FIXME: make sure the admin tools actually work
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user