Skip to content

Commit

Permalink
[#14858] - Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Mar 5, 2020
1 parent a8ad1e8 commit ae3ba62
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions tests/integration/Storage/Adapter/Stream/GetSetCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ public function storageAdapterStreamSet(UnitTester $I)
$I->wantToTest('Storage\Adapter\Stream - set()');

$serializer = new SerializerFactory();

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

$data = 'Phalcon Framework';
$result = $adapter->set('test-key', $data);
$I->assertTrue($result);

$target = outputDir() . 'ph-strm/te/st/-k/';
$target = $storageDir . 'ph-strm/te/st/-k/';
$I->amInPath($target);
$I->openFile('test-key');
$expected = 's:3:"ttl";i:3600;s:7:"content";s:25:"s:17:"Phalcon Framework";";}';
Expand All @@ -74,11 +74,11 @@ public function storageAdapterStreamSetWithDots(UnitTester $I)
$I->wantToTest('Storage\Adapter\Stream - set()');

$serializer = new SerializerFactory();

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

Expand All @@ -87,7 +87,7 @@ public function storageAdapterStreamSetWithDots(UnitTester $I)
$result = $adapter->set($filename, $data, 30);
$I->assertTrue($result);

$target = outputDir() . 'ph-strm/in/de/x./12/32/13/21/.c/ac/';
$target = $storageDir . 'ph-strm/in/de/x-/12/32/13/21/-c/ac/';
$I->amInPath($target);
$I->openFile($filename);
$expected = 's:3:"ttl";i:30;s:7:"content";s:25:"s:17:"Phalcon Framework";";}';
Expand All @@ -109,15 +109,15 @@ public function storageAdapterStreamGet(UnitTester $I)
$I->wantToTest('Storage\Adapter\Stream - get()');

$serializer = new SerializerFactory();

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

$target = outputDir() . 'ph-strm/te/st/-k/';
$target = $storageDir . 'ph-strm/te/st/-k/';
$data = 'Phalcon Framework';

$I->assertTrue(
Expand Down Expand Up @@ -154,15 +154,15 @@ public function storageAdapterStreamGetErrors(UnitTester $I)
$I->wantToTest('Storage\Adapter\Stream - get() - errors');

$serializer = new SerializerFactory();

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

$target = outputDir() . 'ph-strm/te/st/-k/';
$target = $storageDir . 'ph-strm/te/st/-k/';
if (true !== is_dir($target)) {
mkdir($target, 0777, true);
}
Expand Down

0 comments on commit ae3ba62

Please sign in to comment.