public function test_prefix指定がある場合_prefixのあとに21文字のランダムな文字列が生成される() { $output1 = SC_Utils::sfGetUniqRandomId('hello'); $output2 = SC_Utils::sfGetUniqRandomId('hello'); $this->assertEquals(26, strlen($output1), '文字列1の長さ'); $this->assertEquals('hello', substr($output1, 0, 5), 'prefix1'); $this->assertEquals(26, strlen($output2), '文字列2の長さ'); $this->assertEquals('hello', substr($output2, 0, 5), 'prefix2'); $this->assertNotEquals($output1, $output2, '生成結果がランダムになる'); }