public function testIsRandomString_isCounterpartOf_generateRandomString()
 {
     $this->assertTrue(StringUtil::isRandomString(StringUtil::generateRandomString(1000), 1000));
 }
Ejemplo n.º 2
0
 protected function determineInstanceId()
 {
     $request = $this->getRequest();
     $instanceId = null;
     if ($this->allowDynamicStepNavigation || $this->allowRedirectAfterSubmit) {
         $instanceId = $request->get($this->getDynamicStepNavigationInstanceParameter());
     }
     if ($instanceId === null) {
         $instanceId = $request->request->get($this->getInstanceKey());
     }
     $instanceIdLength = 10;
     if ($instanceId === null || !StringUtil::isRandomString($instanceId, $instanceIdLength)) {
         $instanceId = StringUtil::generateRandomString($instanceIdLength);
     }
     return $instanceId;
 }
 /**
  * @dataProvider dataFqcnToFlowName
  */
 public function testFqcnToFlowName($fqcn, $expectedFlowName)
 {
     $this->assertSame($expectedFlowName, StringUtil::fqcnToFlowName($fqcn));
 }