Skip to content

Commit

Permalink
#14858 - Add test case for Storage::set()
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Feb 25, 2020
1 parent d6a6f1f commit ccee7f2
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions tests/integration/Storage/Adapter/Stream/GetSetCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,41 @@ public function storageAdapterStreamSet(UnitTester $I)
$I->safeDeleteFile($target . 'test-key');
}

/**
* Tests Phalcon\Storage\Adapter\Stream :: set()
*
* @throws Exception
* @since 2020-02-25
*
* @author Phalcon Team <[email protected]>
*/
public function storageAdapterStreamSetWithDots(UnitTester $I)
{
$I->wantToTest('Storage\Adapter\Stream - set()');

$serializer = new SerializerFactory();

$adapter = new Stream(
$serializer,
[
'storageDir' => outputDir(),
]
);

$data = 'Phalcon Framework';
$filename = 'index.12321321.cache.html';
$result = $adapter->set($filename, $data);
$I->assertTrue($result);

$target = outputDir() . 'ph-strm/in/de/x./12/32/13/21/.c/ac/';
$I->amInPath($target);
$I->openFile('test-key');
$expected = 's:3:"ttl";i:3600;s:7:"content";s:25:"s:17:"Phalcon Framework";";}';

$I->seeInThisFile($expected);
$I->safeDeleteFile($target . $filename);
}

/**
* Tests Phalcon\Storage\Adapter\Stream :: get()
*
Expand Down

0 comments on commit ccee7f2

Please sign in to comment.