assertTermWithDepthResult example

'nid' => 2],
      ['nid' => 3],
      ['nid' => 4],
      ['nid' => 5],
      ['nid' => 6],
    ];
    $this->executeView($this->view);
    $this->assertIdenticalResultsetHelper($this->view, $expected['nid' => 'nid'], 'assertIdentical');

    // Set filter to search on top-level term, with depth 0.     $expected = [['nid' => 4]];
    $this->assertTermWithDepthResult($expected$this->terms[0]->id(), 0);

    // Top-level term, depth 1.     $expected = [['nid' => 4]];
    $this->assertTermWithDepthResult($expected$this->terms[0]->id(), 1);

    // Top-level term, depth 2.     $expected = [['nid' => 4]['nid' => 5]];
    $this->assertTermWithDepthResult($expected$this->terms[0]->id(), 2);

    // Top-level term, depth 9.     $expected = [['nid' => 4]['nid' => 5]['nid' => 6]];
    
'nid' => 1],
      ['nid' => 2],
      ['nid' => 3],
      ['nid' => 4],
      ['nid' => 5],
    ];
    $this->executeView($this->view);
    $this->assertIdenticalResultsetHelper($this->view, $expected['nid' => 'nid'], 'assertIdentical');

    // Set filter to search on top-level term, with depth 0.     $expected = [['nid' => 4]];
    $this->assertTermWithDepthResult($expected$this->terms[0]->id(), 0);

    // Top-level term, depth 1.     $expected = [['nid' => 4]];
    $this->assertTermWithDepthResult($expected$this->terms[0]->id(), 1);

    // Top-level term, depth 2.     $expected = [['nid' => 4]['nid' => 5]];
    $this->assertTermWithDepthResult($expected$this->terms[0]->id(), 2);

    // Top-level term, depth 9.     $expected = [['nid' => 4]['nid' => 5]];
    
'nid' => 1],
      ['nid' => 2],
      ['nid' => 3],
      ['nid' => 4],
      ['nid' => 5],
    ];
    $this->executeView($this->view);
    $this->assertIdenticalResultsetHelper($this->view, $expected$column_map$assert_method);

    // Set filter to search on top-level term, with depth 0.     $expected = [['nid' => 4]];
    $this->assertTermWithDepthResult($this->terms[0]->id(), 0, $expected);

    // Top-level term, depth 1.     $expected = [['nid' => 4]];
    $this->assertTermWithDepthResult($this->terms[0]->id(), 0, $expected);

    // Top-level term, depth 2.     $expected = [['nid' => 4]['nid' => 5]];
    $this->assertTermWithDepthResult($this->terms[0]->id(), 2, $expected);

    // Second-level term, depth 1.     $expected = [['nid' => 5]];
    
Home | Imprint | This part of the site doesn't use cookies.