3 namespace Drupal\statistics\Tests;
5 use Drupal\simpletest\WebTestBase;
8 * Defines a base class for testing the Statistics module.
10 * @deprecated Scheduled for removal in Drupal 9.0.0.
11 * Use \Drupal\Tests\statistics\Functional\StatisticsTestBase instead.
13 abstract class StatisticsTestBase extends WebTestBase {
20 public static $modules = ['node', 'block', 'ban', 'statistics'];
23 * User with permissions to ban IP's.
25 * @var \Drupal\user\UserInterface
27 protected $blockingUser;
29 protected function setUp() {
32 // Create Basic page node type.
33 if ($this->profile != 'standard') {
34 $this->drupalCreateContentType(['type' => 'page', 'name' => 'Basic page']);
38 $this->blockingUser = $this->drupalCreateUser([
39 'access administration pages',
40 'access site reports',
43 'administer statistics',
46 $this->drupalLogin($this->blockingUser);
49 $this->config('statistics.settings')
50 ->set('count_content_views', 1)