AZ_Listing_Tests::test_populated_taxonomy_listing()


Description


Source

File: tests/test-listing.php

	function test_populated_taxonomy_listing() {
		$title = 'Test Category';
		$t = $this->factory->term->create( array(
			'name' => $title,
			'taxonomy' => 'category',
		) );

		$expected = sprintf( file_get_contents( 'tests/populated-taxonomy-listing.txt' ), $title, $t );
		$actual = get_the_a_z_listing( 'category' );

		$expected = preg_replace( '/\s{2,}|\t|\n/', '', $expected );
		$actual = preg_replace( '/\s{2,}|\t|\n/', '', $actual );
		$this->assertEquals( $expected, $actual );
	}

User Contributed Notes

You must log in before being able to contribute a note or feedback.