Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
removed usage of sf2 when possible
  • Loading branch information
fabpot committed Oct 10, 2018
commit 8406ee86a9bc6d16f884da0ad0b11b3c42c7022e
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected function setUp()
{
$this->fs = new Filesystem();
$this->kernel = new TestAppKernel('test', true);
$this->rootDir = sys_get_temp_dir().\DIRECTORY_SEPARATOR.uniqid('sf2_cache_', true);
$this->rootDir = sys_get_temp_dir().\DIRECTORY_SEPARATOR.uniqid('sf_cache_', true);
$this->kernel->setRootDir($this->rootDir);
$this->fs->mkdir($this->rootDir);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function testDebugDefaultRootDirectory()
{
$this->fs->remove($this->translationDir);
$this->fs = new Filesystem();
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf2_translation', true);
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);
$this->fs->mkdir($this->translationDir.'/translations');
$this->fs->mkdir($this->translationDir.'/templates');

Expand Down Expand Up @@ -112,7 +112,7 @@ public function testDebugInvalidDirectory()
protected function setUp()
{
$this->fs = new Filesystem();
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf2_translation', true);
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);
$this->fs->mkdir($this->translationDir.'/Resources/translations');
$this->fs->mkdir($this->translationDir.'/Resources/views');
$this->fs->mkdir($this->translationDir.'/translations');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function testDumpMessagesAndClean()
public function testDumpMessagesAndCleanInRootDirectory()
{
$this->fs->remove($this->translationDir);
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf2_translation', true);
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);
$this->fs->mkdir($this->translationDir.'/translations');
$this->fs->mkdir($this->translationDir.'/templates');

Expand Down Expand Up @@ -71,7 +71,7 @@ public function testWriteMessages()
public function testWriteMessagesInRootDirectory()
{
$this->fs->remove($this->translationDir);
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf2_translation', true);
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);
$this->fs->mkdir($this->translationDir.'/translations');
$this->fs->mkdir($this->translationDir.'/templates');

Expand All @@ -90,7 +90,7 @@ public function testWriteMessagesForSpecificDomain()
protected function setUp()
{
$this->fs = new Filesystem();
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf2_translation', true);
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);
$this->fs->mkdir($this->translationDir.'/Resources/translations');
$this->fs->mkdir($this->translationDir.'/Resources/views');
$this->fs->mkdir($this->translationDir.'/translations');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class TranslatorTest extends TestCase

protected function setUp()
{
$this->tmpDir = sys_get_temp_dir().'/sf2_translation';
$this->tmpDir = sys_get_temp_dir().'/sf_translation';
$this->deleteTmpDir();
}

Expand Down
8 changes: 4 additions & 4 deletions src/Symfony/Component/Form/Tests/CompoundFormTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ public function requestMethodProvider()
*/
public function testSubmitPostOrPutRequest($method)
{
$path = tempnam(sys_get_temp_dir(), 'sf2');
$path = tempnam(sys_get_temp_dir(), 'sf');
touch($path);
file_put_contents($path, 'zaza');
$values = array(
Expand Down Expand Up @@ -643,7 +643,7 @@ public function testSubmitPostOrPutRequest($method)
*/
public function testSubmitPostOrPutRequestWithEmptyRootFormName($method)
{
$path = tempnam(sys_get_temp_dir(), 'sf2');
$path = tempnam(sys_get_temp_dir(), 'sf');
touch($path);
file_put_contents($path, 'zaza');

Expand Down Expand Up @@ -691,7 +691,7 @@ public function testSubmitPostOrPutRequestWithEmptyRootFormName($method)
*/
public function testSubmitPostOrPutRequestWithSingleChildForm($method)
{
$path = tempnam(sys_get_temp_dir(), 'sf2');
$path = tempnam(sys_get_temp_dir(), 'sf');
touch($path);
file_put_contents($path, 'zaza');

Expand Down Expand Up @@ -728,7 +728,7 @@ public function testSubmitPostOrPutRequestWithSingleChildForm($method)
*/
public function testSubmitPostOrPutRequestWithSingleChildFormUploadedFile($method)
{
$path = tempnam(sys_get_temp_dir(), 'sf2');
$path = tempnam(sys_get_temp_dir(), 'sf');
touch($path);
file_put_contents($path, 'zaza');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected function setUp()
),
),
);
$this->bag = new AttributeBag('_sf2');
$this->bag = new AttributeBag('_sf');
$this->bag->initialize($this->array);
}

Expand All @@ -67,7 +67,7 @@ public function testInitialize()

public function testGetStorageKey()
{
$this->assertEquals('_sf2', $this->bag->getStorageKey());
$this->assertEquals('_sf', $this->bag->getStorageKey());
$attributeBag = new AttributeBag('test');
$this->assertEquals('test', $attributeBag->getStorageKey());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected function setUp()
'data_field' => 'data',
'time_field' => 'time',
'expiry_field' => 'expires_at',
'database' => 'sf2-test',
'database' => 'sf-test',
'collection' => 'session-test',
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected function tearDown()

protected function getPersistentSqliteDsn()
{
$this->dbFile = tempnam(sys_get_temp_dir(), 'sf2_sqlite_sessions');
$this->dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_sessions');

return 'sqlite:'.$this->dbFile;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class MockFileSessionStorageTest extends TestCase

protected function setUp()
{
$this->sessionDir = sys_get_temp_dir().'/sf2test';
$this->sessionDir = sys_get_temp_dir().'/sftest';
$this->storage = $this->getStorage();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class NativeSessionStorageTest extends TestCase
protected function setUp()
{
$this->iniSet('session.save_handler', 'files');
$this->iniSet('session.save_path', $this->savePath = sys_get_temp_dir().'/sf2test');
$this->iniSet('session.save_path', $this->savePath = sys_get_temp_dir().'/sftest');
if (!is_dir($this->savePath)) {
mkdir($this->savePath);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class PhpBridgeSessionStorageTest extends TestCase
protected function setUp()
{
$this->iniSet('session.save_handler', 'files');
$this->iniSet('session.save_path', $this->savePath = sys_get_temp_dir().'/sf2test');
$this->iniSet('session.save_path', $this->savePath = sys_get_temp_dir().'/sftest');
if (!is_dir($this->savePath)) {
mkdir($this->savePath);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ChainCacheClearerTest extends TestCase

public static function setUpBeforeClass()
{
self::$cacheDir = tempnam(sys_get_temp_dir(), 'sf2_cache_clearer_dir');
self::$cacheDir = tempnam(sys_get_temp_dir(), 'sf_cache_clearer_dir');
}

public static function tearDownAfterClass()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CacheWarmerAggregateTest extends TestCase

public static function setUpBeforeClass()
{
self::$cacheDir = tempnam(sys_get_temp_dir(), 'sf2_cache_warmer_dir');
self::$cacheDir = tempnam(sys_get_temp_dir(), 'sf_cache_warmer_dir');
}

public static function tearDownAfterClass()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CacheWarmerTest extends TestCase

public static function setUpBeforeClass()
{
self::$cacheFile = tempnam(sys_get_temp_dir(), 'sf2_cache_warmer_dir');
self::$cacheFile = tempnam(sys_get_temp_dir(), 'sf_cache_warmer_dir');
}

public static function tearDownAfterClass()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class FileProfilerStorageTest extends TestCase

protected function setUp()
{
$this->tmpDir = sys_get_temp_dir().'/sf2_profiler_file_storage';
$this->tmpDir = sys_get_temp_dir().'/sf_profiler_file_storage';
if (is_dir($this->tmpDir)) {
self::cleanDir();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function testFindWorksWithStatusCode()

protected function setUp()
{
$this->tmp = tempnam(sys_get_temp_dir(), 'sf2_profiler');
$this->tmp = tempnam(sys_get_temp_dir(), 'sf_profiler');
if (file_exists($this->tmp)) {
@unlink($this->tmp);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class TranslatorCacheTest extends TestCase

protected function setUp()
{
$this->tmpDir = sys_get_temp_dir().'/sf2_translation';
$this->tmpDir = sys_get_temp_dir().'/sf_translation';
$this->deleteTmpDir();
}

Expand Down