1, 'slug' => 'ribs', ); $theme2 = (object) array( 'id' => 2, 'slug' => 'chicken', ); $theme3 = (object) array( 'id' => 3, 'slug' => 'Storefront', ); $theme4 = (object) array( 'id' => 4, 'slug' => 'poutine', ); $some_themes = array( $theme1, $theme2, $theme3, $theme4 ); $sorted_themes = OnboardingThemes::sort_woocommerce_themes( $some_themes ); $this->assertEquals( 'Storefront', $sorted_themes[0]->slug ); } }