Issue #2972573: randomMachineName() should conform to processMachineName() pattern
2 unresolved threads
Merge request reports
Activity
130 } 131 } 132 133 /** 134 * Tests infinite loop prevention whilst generating random names. 135 * 136 * @covers ::machineName 137 */ 138 public function testRandomMachineNameException(): void { 139 // There are fewer than 100 possibilities so an exception should occur to 140 // prevent infinite loops. 141 $random = new Random(); 142 $this->expectException(\RuntimeException::class); 143 for ($i = 0; $i <= 100; $i++) { 144 $str = $random->machineName(1, TRUE); 145 $names[$str] = TRUE; changed this line in version 2 of the diff
146 } 147 } 148 149 /** 150 * Tests random name generation if uniqueness is not enforced. 151 * 152 * @covers ::machineName 153 */ 154 public function testRandomMachineNameNonUnique(): void { 155 // There are fewer than 100 possibilities if we were forcing uniqueness so 156 // exception would occur. 157 $random = new Random(); 158 for ($i = 0; $i <= 100; $i++) { 159 $random->machineName(1); 160 } 161 $this->assertTrue(TRUE, 'No exception thrown when uniqueness is not enforced.'); changed this line in version 2 of the diff
added 227 commits
-
0e2a7df1...b6aef35b - 112 commits from branch
project:10.1.x
- b6aef35b...80aa96f1 - 105 earlier commits
- f87821dd - Issue #3129669 by smustgrave, larowlan, S3b0uN3t: Block content set contextual...
- e0cbbca6 - Issue #3052115 by huzooka, HitchShock, floydm, ranjith_kumar_k_u, Sam152,...
- 381c38a9 - Issue #3359240 by Utkarsh_33, narendraR, deviantintegral, lauriii,...
- 8b92bea8 - Issue #3356515 by fjgarlin, varun verma, smustgrave: Give users a way to...
- 224543f1 - Issue #3351886 by Arantxio, daffie, mondrake, longwave: Change...
- 0a6ff263 - Issue #3261574 by quietone, kkalashnikov, alexpott, smustgrave: Add .engine to...
- 8b85a044 - Issue #3360139 by bradjones1: Phpdoc for ResourceTypeRepositoryInterface::get...
- b7c4aaf2 - Issue #3361465 by Spokje: Remove outdated @todo's pointing to #3135457
- 1018476b - Merge branch '11.x' into 2972573-randommachinename-should-conform
- 68cbea10 - 2972573-randommachinename-should-conform
Toggle commit list-
0e2a7df1...b6aef35b - 112 commits from branch
1 1 <?php 2 2 3 namespace Drupal\Tests\system\Functional\Common; 3 namespace Drupal\Tests\system\FunctionalJavaScript; the typo caused test to be skipped
Edited by Andrey Postnikov
Please register or sign in to reply