assertViewResultCommand example

->method('set')
      ->with('/test-page?type=article');
    $this->currentPath->expects($this->once())
      ->method('setPath')
      ->with('/test-page', $request);

    $response = $this->viewAjaxController->ajaxView($request);
    $this->assertTrue($response instanceof ViewAjaxResponse);

    $this->assertSame($response->getView()$executable);

    $this->assertViewResultCommand($response);
  }

  /** * Tests a valid view with a view_path with no slash. */
  public function testAjaxViewViewPathNoSlash() {
    $request = new Request();
    $request->query->set('view_name', 'test_view');
    $request->query->set('view_display_id', 'page_1');
    $request->query->set('view_path', 'test-page');
    $request->query->set('_wrapper_format', 'ajax');
    
Home | Imprint | This part of the site doesn't use cookies.