protected function setUp() { parent::setUp(); // Create Basic page node type. if ($this->profile != 'standard') { $this->drupalCreateContentType(array('type' => 'page', 'name' => 'Basic page')); } $this->privileged_user = $this->drupalCreateUser(array('administer statistics', 'view post access counter', 'create page content')); $this->drupalLogin($this->privileged_user); $this->test_node = $this->drupalCreateNode(array('type' => 'page', 'uid' => $this->privileged_user->id())); $this->client = \Drupal::httpClient(); $this->client->setDefaultOption('config/curl', array(CURLOPT_TIMEOUT => 10)); }