Skip to content

Commit

Permalink
Whitespace and fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joshcanhelp committed Jan 30, 2020
1 parent 7448539 commit 8f60b5b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion WP_Auth0.php
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ function wp_auth0_filter_login_override_url( $wp_login_url ) {
*/
function wp_auth0_filter_login_override_form() {
if ( wp_auth0_can_show_wp_login_form() && isset( $_REQUEST['wle'] ) ) {
$wle_encoded = esc_attr($_REQUEST['wle']);
$wle_encoded = esc_attr( $_REQUEST['wle'] );
printf( '<input type="hidden" name="wle" value="%s" />', $wle_encoded );
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/testAdminAppearanceValidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function testThatLanguageDictIsBlankIfInvalidJson() {
public function testThatLanguageDictIsPreviousValIfInvalidJson() {
$validated = self::$admin->basic_validation(
[ 'language_dictionary' => '{"previous":"value"}' ],
[ 'language_dictionary' => uniqid() ]
[ 'language_dictionary' => '{"new":value"}' ]
);
$this->assertEquals( '{"previous":"value"}', $validated['language_dictionary'] );

Expand Down
6 changes: 3 additions & 3 deletions tests/testEmbedWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ public function testThatWidgetIdIsCorrect() {
public function testThatInvalidDictJsonIsRevertedToPreviousValue() {
$widget = new WP_Auth0_Embed_Widget();
$new_opts = [
'dict' => uniqid(),
'dict' => '__test_new_value__',
'extra_conf' => '',
];
$old_opts = [ 'dict' => uniqid() ];
$old_opts = [ 'dict' => '__test_old_value__' ];
$validated = $widget->update( $new_opts, $old_opts );

$this->assertEquals( $old_opts['dict'], $validated['dict'] );
$this->assertEquals( '__test_old_value__', $validated['dict'] );
}

public function testThatEmptyDictJsonIsAccepted() {
Expand Down

0 comments on commit 8f60b5b

Please sign in to comment.