-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from MyOnlineStore/update-bundle-sf-4
Made bundle compatible with symfony 3.4
- Loading branch information
Showing
23 changed files
with
165 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
language: php | ||
|
||
php: | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
- 7.0 | ||
- hhvm | ||
- 7.1 | ||
- 7.2 | ||
- 7.3 | ||
|
||
before_install: | ||
- composer self-update | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,10 +11,12 @@ | |
*/ | ||
|
||
namespace Tedivm\StashBundle\Adapters; | ||
|
||
use Doctrine\Common\Cache\Cache as DoctrineCacheInterface; | ||
|
||
/** | ||
* Class DoctrineAdapter | ||
* | ||
* @package Tedivm\StashBundle\Adapters | ||
* @author Josh Hall-Bachner <[email protected]> | ||
* @author Robert Hafner <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,16 +12,19 @@ | |
|
||
namespace Tedivm\StashBundle\Tests\Collector; | ||
|
||
use \Stash\DriverList; | ||
use \Tedivm\StashBundle\Service\CacheTracker as Tracker; | ||
use PHPUnit\Framework\TestCase; | ||
use Stash\DriverList; | ||
use Symfony\Component\HttpFoundation\Request; | ||
use Symfony\Component\HttpFoundation\Response; | ||
use Tedivm\StashBundle\Service\CacheTracker as Tracker; | ||
|
||
/** | ||
* Class CacheDataCollectorTest | ||
* @package Tedivm\StashBundle\Tests\Collector | ||
* @author Josh Hall-Bachner <[email protected]> | ||
* @author Robert Hafner <[email protected]> | ||
*/ | ||
class CacheDataCollectorTest extends \PHPUnit_Framework_TestCase | ||
class CacheDataCollectorTest extends TestCase | ||
{ | ||
protected $testClass = 'Tedivm\StashBundle\Collector\CacheDataCollector'; | ||
|
||
|
@@ -121,17 +124,28 @@ public function testGetAvailableDrivers() | |
|
||
//var_dump($drivers, $systemDrivers);exit(); | ||
foreach ($drivers as $driver) { | ||
$this->assertTrue(in_array($driver, $systemDrivers), | ||
'getDrivers returns only registered drivers- Unregistered: ' . $driver); | ||
self::assertTrue( | ||
in_array($driver, $systemDrivers), | ||
'getDrivers returns only registered drivers- Unregistered: ' . $driver | ||
); | ||
} | ||
} | ||
|
||
public function testResetWillSetDataToEmptyArray() | ||
{ | ||
$collector = $this->getPrimedCollector(); | ||
|
||
self::assertNotSame('a:0:{}', $collector->serialize()); | ||
$collector->reset(); | ||
self::assertSame('a:0:{}', $collector->serialize()); | ||
} | ||
|
||
protected function getPrimedCollector() | ||
{ | ||
$collector = $this->getPopulatedCollector(); | ||
|
||
$requestMock = $this->getMock('Symfony\Component\HttpFoundation\Request'); | ||
$responseMock = $this->getMock('Symfony\Component\HttpFoundation\Response'); | ||
$requestMock = $this->createMock(Request::class); | ||
$responseMock = $this->createMock(Response::class); | ||
|
||
$collector->collect($requestMock, $responseMock); | ||
|
||
|
Oops, something went wrong.