mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Tests: Use more appropriate assertions in various tests.
This replaces instances of `assertTrue( is_array( ... ) )` with `assertIsArray()` to use native PHPUnit functionality. Follow-up to [51331]. See #53363. git-svn-id: https://develop.svn.wordpress.org/trunk@51335 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -145,16 +145,16 @@ class Tests_Theme extends WP_UnitTestCase {
|
||||
$this->assertNotEmpty( $theme['Stylesheet'] );
|
||||
|
||||
// Template files should all exist.
|
||||
$this->assertTrue( is_array( $theme['Template Files'] ) );
|
||||
$this->assertTrue( count( $theme['Template Files'] ) > 0 );
|
||||
$this->assertIsArray( $theme['Template Files'] );
|
||||
$this->assertNotEmpty( $theme['Template Files'] );
|
||||
foreach ( $theme['Template Files'] as $file ) {
|
||||
$this->assertTrue( is_file( $dir . $file ) );
|
||||
$this->assertTrue( is_readable( $dir . $file ) );
|
||||
}
|
||||
|
||||
// CSS files should all exist.
|
||||
$this->assertTrue( is_array( $theme['Stylesheet Files'] ) );
|
||||
$this->assertTrue( count( $theme['Stylesheet Files'] ) > 0 );
|
||||
$this->assertIsArray( $theme['Stylesheet Files'] );
|
||||
$this->assertNotEmpty( $theme['Stylesheet Files'] );
|
||||
foreach ( $theme['Stylesheet Files'] as $file ) {
|
||||
$this->assertTrue( is_file( $dir . $file ) );
|
||||
$this->assertTrue( is_readable( $dir . $file ) );
|
||||
|
||||
Reference in New Issue
Block a user