WordPress.org

Make WordPress Core

Ticket #35452: 35452-tests.patch

File 35452-tests.patch, 985 bytes (added by stevenkword, 5 years ago)
  • tests/phpunit/tests/rewrite/prettyPermalinks.php

     
     1<?php
     2/**
     3 * @group rewrite
     4 */
     5class Tests_Rewrite_Pretty_Permalinks extends WP_UnitTestCase {
     6
     7        public function setUp() {
     8                parent::setUp();
     9                $this->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );
     10        }
     11
     12        public function test_term_permalink() {
     13                $term     = self::factory()->term->create_and_get();
     14                $expected = 'http://' . WP_TESTS_DOMAIN . '/tag/' . $term->slug . '/';
     15                $actual   = get_term_link( $term );
     16                $this->assertEquals( $expected, $actual );
     17        }
     18
     19}