diff --git a/tests/amp-tag-and-attribute-sanitizer-private-methods-tests.php b/tests/amp-tag-and-attribute-sanitizer-private-methods-tests.php index a4746c4b743..be7f2669b8e 100644 --- a/tests/amp-tag-and-attribute-sanitizer-private-methods-tests.php +++ b/tests/amp-tag-and-attribute-sanitizer-private-methods-tests.php @@ -409,7 +409,7 @@ public function test_validate_attr_spec_rules( $data, $expected ) { $got = $this->invoke_method( $sanitizer, $data['func_name'], array( $node, $data['attribute_name'], $attr_spec_rule ) ); - if ( $expected != $got ) { + if ( $expected !== $got ) { printf( 'using source: %s' . PHP_EOL, $source ); var_dump( $data ); } @@ -566,7 +566,7 @@ public function test_is_allowed_attribute( $data, $expected ) { $got = $this->invoke_method( $sanitizer, $data['func_name'], array( $data['attribute_name'], $attr_spec_list ) ); - if ( $expected != $got ) { + if ( $expected !== $got ) { printf( 'using source: %s' . PHP_EOL, $source ); var_dump( $data ); } @@ -662,7 +662,7 @@ public function test_remove_node( $data, $expected ) { $got = AMP_DOM_Utils::get_content_from_dom( $dom ); - if ( $expected != $got ) { + if ( $expected !== $got ) { printf( 'using source: %s' . PHP_EOL, $data['source'] ); var_dump( $data ); printf( 'got = %s' .PHP_EOL, $got ); @@ -803,7 +803,7 @@ public function test_replace_node_with_children( $data, $expected ) { $got = AMP_DOM_Utils::get_content_from_dom( $dom ); $got = preg_replace( '/(?<=>)\s+(?=<)/', '', $got ); - if ( $expected != $got ) { + if ( $expected !== $got ) { printf( 'using source: %s' . PHP_EOL, $data['source'] ); var_dump( $data ); printf( 'got = %s' .PHP_EOL, $got ); @@ -865,7 +865,7 @@ public function test_get_ancestor_with_tag_name( $data, $expected ) { $got = $this->invoke_method( $sanitizer, 'get_ancestor_with_tag_name', array( $node, $data['ancestor_tag_name'] ) ); - if ( $ancestor_node != $got ) { + if ( $ancestor_node !== $got ) { printf( 'using source: %s' . PHP_EOL, $data['source'] ); var_dump( $data ); } @@ -1071,7 +1071,7 @@ public function test_validate_attr_spec_list_for_node( $data, $expected ) { $got = $this->invoke_method( $sanitizer, 'validate_attr_spec_list_for_node', array( $node, $data['attr_spec_list'] ) ); - if ( $expected != $got ) { + if ( $expected !== $got ) { printf( 'using source: %s' . PHP_EOL, $data['source'] ); var_dump( $data ); } @@ -1198,7 +1198,7 @@ public function test_check_attr_spec_rule_value( $data, $expected ) { $got = $this->invoke_method( $sanitizer, 'check_attr_spec_rule_value', array( $node, $data['attr_name'], $data['attr_spec_rule'] ) ); - if ( $expected != $got ) { + if ( $expected !== $got ) { printf( 'using source: %s' . PHP_EOL, $data['source'] ); var_dump( $data ); } @@ -1350,7 +1350,7 @@ public function test_check_attr_spec_rule_value_casei( $data, $expected ) { $got = $this->invoke_method( $sanitizer, 'check_attr_spec_rule_value_casei', array( $node, $data['attr_name'], $data['attr_spec_rule'] ) ); - if ( $expected != $got ) { + if ( $expected !== $got ) { printf( 'using source: %s' . PHP_EOL, $data['source'] ); var_dump( $data ); } @@ -1444,7 +1444,7 @@ public function test_check_attr_spec_rule_blacklisted_value_regex( $data, $expec $got = $this->invoke_method( $sanitizer, 'check_attr_spec_rule_blacklisted_value_regex', array( $node, $data['attr_name'], $data['attr_spec_rule'] ) ); - if ( $expected != $got ) { + if ( $expected !== $got ) { printf( 'using source: %s' . PHP_EOL, $data['source'] ); var_dump( $data ); } @@ -1579,7 +1579,7 @@ public function test_check_attr_spec_rule_allowed_protocol( $data, $expected ) { $got = $this->invoke_method( $sanitizer, 'check_attr_spec_rule_allowed_protocol', array( $node, $data['attr_name'], $data['attr_spec_rule'] ) ); - if ( $expected != $got ) { + if ( $expected !== $got ) { printf( 'using source: %s' . PHP_EOL, $data['source'] ); var_dump( $data ); } @@ -1728,7 +1728,7 @@ public function test_check_attr_spec_rule_disallowed_relative( $data, $expected $got = $this->invoke_method( $sanitizer, 'check_attr_spec_rule_disallowed_relative', array( $node, $data['attr_name'], $data['attr_spec_rule'] ) ); - if ( $expected != $got ) { + if ( $expected !== $got ) { printf( 'using source: %s' . PHP_EOL, $data['source'] ); var_dump( $data ); }