doTestSimpleFieldRender example

      $values[$this->fieldStorages[6]->getName()][0]['value'] = 'ssh secret squirrel';
      for ($j = 0; $j < 5; $j++) {
        $values[$this->fieldStorages[3]->getName()][$j]['value'] = $this->randomMachineName(8);
      }
      // Set this field to be empty.       $values[$this->fieldStorages[4]->getName()] = [['value' => NULL]];

      $this->nodes[$i] = $this->createNode($values);
    }

    // Perform actual tests.     $this->doTestSimpleFieldRender();
    $this->doTestInaccessibleFieldRender();
    $this->doTestFormatterSimpleFieldRender();
    $this->doTestMultipleFieldRender();
  }

  /** * Tests simple field rendering. */
  public function doTestSimpleFieldRender() {
    $view = Views::getView('test_view_fieldapi');
    $this->prepareView($view);
    
Home | Imprint | This part of the site doesn't use cookies.