Changeset 48937 for trunk/tests/phpunit/tests/widgets/media-widget.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/widgets/media-widget.php
r48858 r48937 77 77 array_keys( $widget->l10n ) 78 78 ); 79 $this->assert Equals( count( $widget->l10n ), count( array_filter( $widget->l10n ) ), 'Expected all translation strings to be defined.' );80 $this->assert Equals( 10, has_action( 'admin_print_scripts-widgets.php', array( $widget, 'enqueue_admin_scripts' ) ) );79 $this->assertSame( count( $widget->l10n ), count( array_filter( $widget->l10n ) ), 'Expected all translation strings to be defined.' ); 80 $this->assertSame( 10, has_action( 'admin_print_scripts-widgets.php', array( $widget, 'enqueue_admin_scripts' ) ) ); 81 81 $this->assertFalse( has_action( 'wp_enqueue_scripts', array( $widget, 'enqueue_preview_scripts' ) ), 'Did not expect preview scripts to be enqueued when not in customize preview context.' ); 82 $this->assert Equals( 10, has_action( 'admin_footer-widgets.php', array( $widget, 'render_control_template_scripts' ) ) );82 $this->assertSame( 10, has_action( 'admin_footer-widgets.php', array( $widget, 'render_control_template_scripts' ) ) ); 83 83 84 84 // With non-default args. … … 93 93 ); 94 94 $widget = $this->get_mocked_class_instance( $id_base, $name, $widget_options, $control_options ); 95 $this->assert Equals( $id_base, $widget->id_base );96 $this->assert Equals( $name, $widget->name );95 $this->assertSame( $id_base, $widget->id_base ); 96 $this->assertSame( $name, $widget->name ); 97 97 98 98 // Method assertArraySubset doesn't exist in phpunit versions compatible with PHP 5.2. … … 129 129 $widget = $this->get_mocked_class_instance(); 130 130 $widget->_register(); 131 $this->assert Equals( 10, has_action( 'wp_enqueue_scripts', array( $widget, 'enqueue_preview_scripts' ) ) );131 $this->assertSame( 10, has_action( 'wp_enqueue_scripts', array( $widget, 'enqueue_preview_scripts' ) ) ); 132 132 } 133 133 … … 170 170 171 171 $result = $widget->sanitize_token_list( 'What A false class with-token <a href="#">and link</a>' ); 172 $this->assert Equals( 'What A false class with-token a hrefand linka', $result );172 $this->assertSame( 'What A false class with-token a hrefand linka', $result ); 173 173 174 174 $result = $widget->sanitize_token_list( array( 'foo', '<i>bar', '">NO' ) ); 175 $this->assert Equals( $result, 'foo ibar NO' );175 $this->assertSame( $result, 'foo ibar NO' ); 176 176 } 177 177 … … 340 340 $this->assertCount( 3, $this->widget_instance_filter_args ); 341 341 $this->assertEquals( $instance, $this->widget_instance_filter_args[0] ); 342 $this->assert Equals( $args, $this->widget_instance_filter_args[1] );343 $this->assert Equals( $widget, $this->widget_instance_filter_args[2] );342 $this->assertSame( $args, $this->widget_instance_filter_args[1] ); 343 $this->assertSame( $widget, $this->widget_instance_filter_args[2] ); 344 344 $output = ob_get_clean(); 345 345
Note: See TracChangeset
for help on using the changeset viewer.