Skip to content

Commit

Permalink
Tests: Fix - Document config test fails.
Browse files Browse the repository at this point in the history
`get_model_for_config` method returns null if it's not in the loop of a singular query.
  • Loading branch information
matipojo committed Sep 23, 2020
1 parent 4c06454 commit 354bdd1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/phpunit/elementor/core/base/test-document.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ public function test_get_editor_panel_config_ensure_default_route() {

$default_route_excepted = 'panel/elements/categories';
$document = Plugin::$instance->documents->get( $this->factory()->create_and_get_default_post()->ID );

query_posts( [
'p' => $document->get_main_id(),
] );

the_post();

$config = $document->get_config();

$this->assertEquals( $default_route_excepted, $config['panel']['default_route'],
Expand Down

0 comments on commit 354bdd1

Please sign in to comment.