Changeset 48937 for trunk/tests/phpunit/tests/date/theDate.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/date/theDate.php
r48911 r48937 62 62 ob_end_clean(); 63 63 64 $this->assert Equals( 1, $this->hooks_called['the_time'] );65 $this->assert Equals( 2, $this->hooks_called['get_the_time'] );64 $this->assertSame( 1, $this->hooks_called['the_time'] ); 65 $this->assertSame( 2, $this->hooks_called['get_the_time'] ); 66 66 67 $this->assert Equals( 1, $this->hooks_called['the_modified_time'] );68 $this->assert Equals( 2, $this->hooks_called['get_the_modified_time'] );67 $this->assertSame( 1, $this->hooks_called['the_modified_time'] ); 68 $this->assertSame( 2, $this->hooks_called['get_the_modified_time'] ); 69 69 70 $this->assert Equals( 1, $this->hooks_called['the_date'] );71 $this->assert Equals( 2, $this->hooks_called['get_the_date'] );70 $this->assertSame( 1, $this->hooks_called['the_date'] ); 71 $this->assertSame( 2, $this->hooks_called['get_the_date'] ); 72 72 73 $this->assert Equals( 1, $this->hooks_called['the_modified_date'] );74 $this->assert Equals( 2, $this->hooks_called['get_the_modified_date'] );73 $this->assertSame( 1, $this->hooks_called['the_modified_date'] ); 74 $this->assertSame( 2, $this->hooks_called['get_the_modified_date'] ); 75 75 76 $this->assert Equals( 5, $this->hooks_called['get_post_time'] );77 $this->assert Equals( 5, $this->hooks_called['get_post_modified_time'] );76 $this->assertSame( 5, $this->hooks_called['get_post_time'] ); 77 $this->assertSame( 5, $this->hooks_called['get_post_modified_time'] ); 78 78 } 79 79 … … 91 91 the_date(); 92 92 $actual = ob_get_clean(); 93 $this->assert Equals( '', $actual );93 $this->assertSame( '', $actual ); 94 94 95 95 $GLOBALS['post'] = self::factory()->post->create_and_get( … … 103 103 $GLOBALS['previousday'] = '17.09.15'; 104 104 the_date(); 105 $this->assert Equals( 'September 16, 2015', ob_get_clean() );105 $this->assertSame( 'September 16, 2015', ob_get_clean() ); 106 106 107 107 ob_start(); … … 109 109 $GLOBALS['previousday'] = '17.09.15'; 110 110 the_date( 'Y' ); 111 $this->assert Equals( '2015', ob_get_clean() );111 $this->assertSame( '2015', ob_get_clean() ); 112 112 113 113 ob_start(); … … 115 115 $GLOBALS['previousday'] = '17.09.15'; 116 116 the_date( 'Y', 'before ', ' after' ); 117 $this->assert Equals( 'before 2015 after', ob_get_clean() );117 $this->assertSame( 'before 2015 after', ob_get_clean() ); 118 118 119 119 ob_start(); … … 121 121 $GLOBALS['previousday'] = '17.09.15'; 122 122 the_date( 'Y', 'before ', ' after', false ); 123 $this->assert Equals( '', ob_get_clean() );123 $this->assertSame( '', ob_get_clean() ); 124 124 } 125 125 … … 131 131 the_weekday_date(); 132 132 $actual = ob_get_clean(); 133 $this->assert Equals( '', $actual );133 $this->assertSame( '', $actual ); 134 134 135 135 $GLOBALS['post'] = self::factory()->post->create_and_get( … … 143 143 $GLOBALS['previousweekday'] = '17.09.15'; 144 144 the_weekday_date(); 145 $this->assert Equals( 'Wednesday', ob_get_clean() );145 $this->assertSame( 'Wednesday', ob_get_clean() ); 146 146 147 147 ob_start(); … … 149 149 $GLOBALS['previousweekday'] = '17.09.15'; 150 150 the_weekday_date( 'before ', ' after' ); 151 $this->assert Equals( 'before Wednesday after', ob_get_clean() );151 $this->assertSame( 'before Wednesday after', ob_get_clean() ); 152 152 } 153 153 }
Note: See TracChangeset
for help on using the changeset viewer.