Skip to content

Commit

Permalink
Merge pull request #214 from FriendsOfCake/cake-3.5
Browse files Browse the repository at this point in the history
Lower Cake version requirement to 3.5.
  • Loading branch information
ADmad authored Apr 16, 2018
2 parents f35a3aa + 223dc7f commit 3731844
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ matrix:
- php: 7.0
env: PHPSTAN=1 DEFAULT=0

- php: 5.6
env: PREFER_LOWEST=1

before_script:
- if [[ $TRAVIS_PHP_VERSION != 7.0 ]]; then phpenv config-rm xdebug.ini; fi

- composer install --prefer-dist --no-interaction
- if [[ $PREFER_LOWEST != 1 ]]; then composer update --no-interaction ; fi
- if [[ $PREFER_LOWEST == 1 ]]; then composer update --no-interaction --prefer-lowest ; fi

- if [[ $PHPCS = 1 ]]; then composer require cakephp/cakephp-codesniffer:"^3.0"; fi
- if [[ $PHPSTAN = 1 ]]; then composer require phpstan/phpstan:^0.8; fi
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
}
],
"require": {
"cakephp/cakephp": "^3.6"
"cakephp/cakephp": "^3.5"
},
"require-dev": {
"cakephp/chronos": "^1.1",
"phpunit/phpunit": "^5.7.14|^6.0"
},
"support": {
Expand Down
11 changes: 9 additions & 2 deletions tests/TestCase/View/Helper/FlashHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use BootstrapUI\View\Helper\FlashHelper;
use Cake\Http\ServerRequest;
use Cake\Http\Session;
use Cake\Network\Session;
use Cake\TestSuite\TestCase;
use Cake\View\View;

Expand Down Expand Up @@ -33,7 +33,14 @@ public function setUp()
{
parent::setUp();
$this->View = new View();
$session = new Session();
$session = null;
if (method_exists($this, 'deprecated')) {
$this->deprecated(function () use (&$session) {
$session = new Session();
});
} else {
$session = new Session();
}
$this->View->request = new ServerRequest(['session' => $session]);
$this->Flash = new FlashHelper($this->View);

Expand Down

0 comments on commit 3731844

Please sign in to comment.