Skip to content

Commit

Permalink
Merge pull request #465 from magento-fearless-kiwis/FearlessKiwis-MAG…
Browse files Browse the repository at this point in the history
…ETWO-59089

Fixed issues:

- MAGETWO-59089 [Github]Magento 2.1.1 Problem with change currency #6746
  • Loading branch information
sdwright committed Oct 5, 2016
2 parents 2cacd80 + 959f2a1 commit a9510d3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/Pricing/Render/PriceBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function getCacheKey()
*/
protected function getCacheLifetime()
{
return parent::hasCacheLifetime() ? parent::getCacheLifetime() : self::DEFAULT_LIFETIME;
return parent::hasCacheLifetime() ? parent::getCacheLifetime() : null;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,4 +241,17 @@ public function testGetRendererPool()
{
$this->assertEquals($this->rendererPool, $this->model->getRendererPool());
}

/**
* This tests ensures that protected method getCacheLifetime() returns a null value when cacheLifeTime is not
* explicitly set in the parent block
*/
public function testCacheLifetime()
{
$reflectionClass = new \ReflectionClass(get_class($this->model));
$methodReflection = $reflectionClass->getMethod('getCacheLifetime');
$methodReflection->setAccessible(true);
$cacheLifeTime = $methodReflection->invoke($this->model);
$this->assertNull($cacheLifeTime, 'Expected null cache lifetime');
}
}

0 comments on commit a9510d3

Please sign in to comment.