diff --git a/core/modules/statistics/src/Tests/StatisticsInvalidPostTest.php b/core/modules/statistics/src/Tests/StatisticsInvalidPostTest.php index a2056d4..cd765c9 100644 --- a/core/modules/statistics/src/Tests/StatisticsInvalidPostTest.php +++ b/core/modules/statistics/src/Tests/StatisticsInvalidPostTest.php @@ -31,7 +31,8 @@ class StatisticsInvalidPostTest extends WebTestBase { */ protected function setUp() { parent::setUp(); - $this->client = new Client(); + $this->client = \Drupal::service('http_client_factory') + ->fromOptions(); // Enable logging. $this->config('statistics.settings') ->set('count_content_views', 1) @@ -57,7 +58,6 @@ public function testInvalidPost() { ->fetchAssoc(); $this->assertEqual($result['nid'], array(), 'Verifying that nothing is written to the node_counter table.'); - // An id greater than int(10), the maximum nid database limit. $nid = 123456789012; $post = array('nid' => $nid); @@ -70,7 +70,6 @@ public function testInvalidPost() { ->execute() ->fetchAssoc(); $this->assertEqual($result['nid'], array(), 'Verifying that nothing is written to the node_counter table.'); - } }