diff --git a/tests/phpunit/tests/general/theArchiveTitle.php b/tests/phpunit/tests/general/theArchiveTitle.php new file mode 100644 index 0000000000000..ba5b4c6bc37c3 --- /dev/null +++ b/tests/phpunit/tests/general/theArchiveTitle.php @@ -0,0 +1,79 @@ +category->create( + array( + 'name' => 'News', + ) + ); + } + + /** + * Tests that the_archive_title() displays the title on a category archive. + * + * @ticket 65819 + */ + public function test_the_archive_title_should_display_on_category_archive() { + $this->go_to( get_category_link( self::$category_id ) ); + + $this->expectOutputString( 'Category: News' ); + the_archive_title(); + } + + /** + * Tests that the_archive_title() outputs before and after markup when provided. + * + * @ticket 65819 + */ + public function test_the_archive_title_should_output_before_and_after_markup() { + $this->go_to( get_category_link( self::$category_id ) ); + + $this->expectOutputString( '