Index: tests/phpunit/tests/functions/getArchives.php
===================================================================
--- tests/phpunit/tests/functions/getArchives.php (revision 36252)
+++ tests/phpunit/tests/functions/getArchives.php (working copy)
@@ -121,4 +121,41 @@
$archives = wp_get_archives( array( 'echo' => false, 'post_type' => 'taco' ) );
$this->assertEquals( $expected, trim( $archives ) );
}
+
+ /**
+ * @ticket 4969
+ */
+ function test_wp_get_archives_title() {
+ $expected = "
Archives Title
\t" . date( 'F Y' ) . "";
+ $result = trim( wp_get_archives(
+ array(
+ 'echo' => false,
+ 'title' => 'Archives Title',
+ 'title_before' => '',
+ 'title_after' => '
',
+ )
+ ) );
+
+ $this->assertEquals( $expected, $result );
+ }
+
+ /**
+ * @ticket 4969
+ */
+ function test_wp_get_archives_before_and_after_list() {
+ $date = date( 'F Y' );
+ $expected = <<\t$date
+
+EOF;
+ $result = trim( wp_get_archives(
+ array(
+ 'echo' => false,
+ 'list_before' => '',
+ )
+ ) );
+
+ $this->assertEquals( $expected, $result );
+ }
}
Index: tests/phpunit/tests/post/listPages.php
===================================================================
--- tests/phpunit/tests/post/listPages.php (revision 36252)
+++ tests/phpunit/tests/post/listPages.php (working copy)
@@ -342,4 +342,43 @@
$actual = wp_list_pages( $args );
$this->AssertEquals( $expected['exclude'], $actual );
}
+
+ /**
+ * @ticket 4969
+ */
+ function test_wp_get_pages_before_and_after() {
+ $expected = '';
+
+ $result = trim( wp_list_pages(
+ array(
+ 'echo' => false,
+ 'before' => '',
+ 'after' => '
',
+ 'title_li' => 'The Pages'
+ )
+ ) );
+
+ $this->assertEquals( $expected, $result );
+ }
}