Skip to content

Commit

Permalink
[util] reset config and check the success of write
Browse files Browse the repository at this point in the history
  • Loading branch information
connorhu committed Dec 20, 2023
1 parent 8e7c1e9 commit ae8d7d6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/util/sfBrowserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
*
* @coversNothing
*/
class sfBrowserTest extends TestCase
class sfBrowserTest extends Symfony1ProjectTestCase
{
use PhpUnitSfTestHelperTrait;

public function testTodoMigrate()
{
$this->resetSfConfig();

// ->click()
$this->diag('->click()');

Expand Down Expand Up @@ -300,7 +302,9 @@ public function testTodoMigrate()

$unexistentFilename = sfConfig::get('sf_test_cache_dir').DIRECTORY_SEPARATOR.'unexistent-file-'.md5(getmypid().'-'.microtime());
$existentFilename = sfConfig::get('sf_test_cache_dir').DIRECTORY_SEPARATOR.'existent-file-'.md5(getmypid().'-'.microtime());
file_put_contents($existentFilename, 'test');
$writeResult = file_put_contents($existentFilename, 'test');

$this->assertNotFalse($writeResult);

list($method, $uri, $parameters) = $b->click('submit', array('myfile' => $unexistentFilename));
$files = $b->getFiles();
Expand Down

0 comments on commit ae8d7d6

Please sign in to comment.