Changeset 13314 for trunk/tests/phpunit/testcases/core/suggestions.php
- Timestamp:
- 08/13/2022 08:58:51 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/core/suggestions.php
r11739 r13314 94 94 } 95 95 96 public static function tear DownAfterClass() {96 public static function tear_down_after_class() { 97 97 foreach ( self::$group_ids as $group_id ) { 98 98 groups_delete_group( $group_id ); … … 110 110 } 111 111 112 public function set Up() {113 parent::set Up();112 public function set_up() { 113 parent::set_up(); 114 114 $this->set_current_user( self::$current_user ); 115 115 } 116 116 117 public function tear Down() {118 parent::tear Down();117 public function tear_down() { 118 parent::tear_down(); 119 119 $this->set_current_user( self::$old_user_id ); 120 120 } … … 392 392 393 393 $this->assertFalse( is_wp_error( $suggestions ) ); 394 $this->assertI nternalType( 'array',$suggestions );394 $this->assertIsArray( $suggestions ); 395 395 $this->assertEmpty( $suggestions ); 396 396 } … … 403 403 404 404 $this->assertFalse( is_wp_error( $suggestion ) ); 405 $this->assertI nternalType( 'array',$suggestion );405 $this->assertIsArray( $suggestion ); 406 406 $this->assertNotEmpty( $suggestion ); 407 407 408 408 $suggestion = array_shift( $suggestion ); 409 409 410 $this->assertI nternalType( 'object',$suggestion );411 $this->assert AttributeNotEmpty( 'image', $suggestion);412 $this->assert AttributeNotEmpty( 'ID', $suggestion);413 $this->assert AttributeNotEmpty( 'name', $suggestion);410 $this->assertIsObject( $suggestion ); 411 $this->assertNotEmpty( $suggestion->image ); 412 $this->assertNotEmpty( $suggestion->ID ); 413 $this->assertNotEmpty( $suggestion->name ); 414 414 } 415 415 … … 421 421 422 422 $this->assertFalse( is_wp_error( $suggestions ) ); 423 $this->assertI nternalType( 'array',$suggestions );423 $this->assertIsArray( $suggestions ); 424 424 $this->assertNotEmpty( $suggestions ); 425 425 426 426 foreach ( $suggestions as $suggestion ) { 427 $this->assertI nternalType( 'object',$suggestion );428 $this->assert AttributeNotEmpty( 'image', $suggestion);429 $this->assert AttributeNotEmpty( 'ID', $suggestion);430 $this->assert AttributeNotEmpty( 'name', $suggestion);427 $this->assertIsObject( $suggestion ); 428 $this->assertNotEmpty( $suggestion->image ); 429 $this->assertNotEmpty( $suggestion->ID ); 430 $this->assertNotEmpty( $suggestion->name ); 431 431 } 432 432 } … … 458 458 459 459 $this->assertFalse( is_wp_error( $suggestion ) ); 460 $this->assertI nternalType( 'array',$suggestion );460 $this->assertIsArray( $suggestion ); 461 461 $this->assertNotEmpty( $suggestion ); 462 462 463 463 $suggestion = array_shift( $suggestion ); 464 464 465 $this->assertI nternalType( 'object',$suggestion );466 $this->assert AttributeInternalType( 'string', 'image', $suggestion);467 $this->assert AttributeInternalType( 'string', 'ID', $suggestion);468 $this->assert AttributeInternalType( 'string', 'name', $suggestion);465 $this->assertIsObject( $suggestion ); 466 $this->assertIsString( $suggestion->image ); 467 $this->assertIsString( $suggestion->ID ); 468 $this->assertIsString( $suggestion->name ); 469 469 } 470 470
Note: See TracChangeset
for help on using the changeset viewer.