Changeset 38513 for trunk/tests/phpunit/tests/customize/manager.php
- Timestamp:
- 09/02/2016 10:34:48 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/customize/manager.php
r37942 r38513 304 304 $this->assertTrue( $this->manager->prepare_setting_validity_for_js( true ) ); 305 305 $error = new WP_Error(); 306 $error->add( 'bad_letter', 'Bad letter' );307 $error->add( 'bad_letter', 'Bad letra' );306 $error->add( 'bad_letter', 'Bad letter', 'A' ); 307 $error->add( 'bad_letter', 'Bad letra', 123 ); 308 308 $error->add( 'bad_number', 'Bad number', array( 'number' => 123 ) ); 309 309 $validity = $this->manager->prepare_setting_validity_for_js( $error ); … … 314 314 $this->assertEquals( join( ' ', $messages ), $validity[ $code ]['message'] ); 315 315 $this->assertArrayHasKey( 'data', $validity[ $code ] ); 316 $this->assert ArrayHasKey( 'from_server', $validity[ $code ]['data']);316 $this->assertEquals( $validity[ $code ]['data'], $error->get_error_data( $code ) ); 317 317 } 318 318 $this->assertArrayHasKey( 'number', $validity['bad_number']['data'] );
Note: See TracChangeset
for help on using the changeset viewer.