Skip to content

Commit 3df2e39

Browse files
committed
Removed caching from tests
1 parent b983d77 commit 3df2e39

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

tests/Products/BuildTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Printful\Tests\Products;
44

5+
use Printful\Structures\File;
56
use Printful\Structures\Sync\Requests\SyncVariantRequestFile;
67
use Printful\Structures\Sync\SyncProductCreationParameters;
78

@@ -58,7 +59,7 @@ private function compareFiles($files, $dataFiles)
5859
$found = false;
5960

6061
foreach ($dataFiles as $dataFile) {
61-
$type = isset($dataFile['type']) ? $dataFile['type'] : SyncVariantRequestFile::TYPE_DEFAULT;
62+
$type = isset($dataFile['type']) ? $dataFile['type'] : File::TYPE_DEFAULT;
6263
if ($type == $file->type) {
6364
$this->assertEquals($dataFile['url'], $file->url);
6465

tests/Products/ProductsTestBase.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,21 +112,14 @@ protected function getPostVariantData()
112112
}
113113

114114
/**
115-
* Creates SyncProduct and caches result
115+
* Creates SyncProduct
116116
*
117-
* @param bool $useCache
118117
* @return SyncProductResponse
119118
* @throws \Printful\Exceptions\PrintfulApiException
120119
* @throws \Printful\Exceptions\PrintfulException
121120
*/
122-
protected function createProduct($useCache = true)
121+
protected function createProduct()
123122
{
124-
static $result;
125-
126-
if ($useCache && $result) {
127-
return $result;
128-
}
129-
130123
$data = $this->getPostProductData();
131124
$params = SyncProductCreationParameters::fromArray($data);
132125

0 commit comments

Comments
 (0)