Skip to content

Commit

Permalink
Fix calling serialize on Reflection
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Brumann committed Jan 10, 2021
1 parent 738212f commit 637d349
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/RuleSet/CacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace SensioLabs\DeprecationDetector\Tests\RuleSet;

use SensioLabs\DeprecationDetector\RuleSet\Cache;
use SensioLabs\DeprecationDetector\RuleSet\RuleSet;

class CacheTest extends \PHPUnit_Framework_TestCase
{
Expand Down Expand Up @@ -40,7 +41,7 @@ public function testHasKey()

public function testSaveCacheIfEnabled()
{
$ruleset = $this->prophesize('SensioLabs\DeprecationDetector\RuleSet\RuleSet')->reveal();
$ruleset = new RuleSet();
$filesystem = $this->prophesize('Symfony\Component\Filesystem\Filesystem');
$filesystem->dumpFile('.rules/id', serialize($ruleset))->shouldBeCalled();

Expand All @@ -50,7 +51,7 @@ public function testSaveCacheIfEnabled()

public function testDoesNotSaveCacheIfDisabled()
{
$ruleset = $this->prophesize('SensioLabs\DeprecationDetector\RuleSet\RuleSet')->reveal();
$ruleset = new RuleSet();
$filesystem = $this->prophesize('Symfony\Component\Filesystem\Filesystem');
$filesystem->dumpFile('.rules/id', serialize($ruleset))->shouldNotBeCalled();

Expand Down

0 comments on commit 637d349

Please sign in to comment.