"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/framework/console/controllers/CacheControllerTest.php" between
yii2-2.0.35.tar.gz and yii2-2.0.36.tar.gz

About: Yii 2 is a high-performance component-based PHP framework for developing large-scale Web applications (source).

CacheControllerTest.php  (yii2-2.0.35):CacheControllerTest.php  (yii2-2.0.36)
skipping to change at line 36 skipping to change at line 36
* @var SilencedCacheController * @var SilencedCacheController
*/ */
private $_cacheController; private $_cacheController;
private $driverName = 'mysql'; private $driverName = 'mysql';
protected function setUp() protected function setUp()
{ {
parent::setUp(); parent::setUp();
$this->_cacheController = Yii::createObject([
'class' => 'yiiunit\framework\console\controllers\SilencedCacheContr
oller',
'interactive' => false,
], [null, null]); //id and module are null
$databases = self::getParam('databases'); $databases = self::getParam('databases');
$config = $databases[$this->driverName]; $config = $databases[$this->driverName];
$pdoDriver = 'pdo_' . $this->driverName; $pdoDriver = 'pdo_' . $this->driverName;
if (!extension_loaded('pdo') || !extension_loaded($pdoDriver)) { if (!extension_loaded('pdo') || !extension_loaded($pdoDriver)) {
$this->markTestSkipped('pdo and ' . $pdoDriver . ' extensions are re quired.'); $this->markTestSkipped('pdo and ' . $pdoDriver . ' extensions are re quired.');
} }
$this->mockApplication([ $this->mockApplication([
'components' => [ 'components' => [
skipping to change at line 75 skipping to change at line 70
], ],
'container' => [ 'container' => [
'singletons' => [ 'singletons' => [
'yii\caching\CacheInterface' => [ 'yii\caching\CacheInterface' => [
'class' => 'yii\caching\ArrayCache', 'class' => 'yii\caching\ArrayCache',
], ],
] ]
], ],
]); ]);
$this->_cacheController = Yii::createObject([
'class' => 'yiiunit\framework\console\controllers\SilencedCacheContr
oller',
'interactive' => false,
], [null, null]); //id and module are null
if (isset($config['fixture'])) { if (isset($config['fixture'])) {
Yii::$app->db->open(); Yii::$app->db->open();
$lines = explode(';', file_get_contents($config['fixture'])); $lines = explode(';', file_get_contents($config['fixture']));
foreach ($lines as $line) { foreach ($lines as $line) {
if (trim($line) !== '') { if (trim($line) !== '') {
Yii::$app->db->pdo->exec($line); Yii::$app->db->pdo->exec($line);
} }
} }
} }
} }
 End of changes. 2 change blocks. 
6 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)