Skip to content

Commit

Permalink
Removed Backward compatibility PHPUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
byjg committed Mar 9, 2018
1 parent d6381aa commit e9cd24e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ install:
- composer install

script:
- phpunit
- vendor/bin/phpunit

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"require-dev": {
"byjg/cache-engine": "4.0.*",
"phpunit/phpunit": "5.7.* || 6.5.*"
"phpunit/phpunit": ">5.7"
},
"prefer-stable": true,
"minimum-stability": "dev",
Expand Down
5 changes: 5 additions & 0 deletions src/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ public function has($id)
return isset($this->config[$id]);
}

/**
* @param $id
* @return mixed
* @throws \ByJG\Config\Exception\NotFoundException
*/
public function raw($id)
{
if (!$this->has($id)) {
Expand Down
3 changes: 3 additions & 0 deletions src/Definition.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ private function loadConfig($currentConfig, $env)
* @param \Psr\SimpleCache\CacheInterface $cache
* @param string|array $env
* @return $this
* @throws \Exception
*/
public function setCache(CacheInterface $cache, $env = "live")
{
Expand Down Expand Up @@ -141,6 +142,8 @@ public function getCurrentEnv()
*
* @param string|null $env
* @return \ByJG\Config\Container
* @throws \ByJG\Config\Exception\NotFoundException
* @throws \Psr\SimpleCache\InvalidArgumentException
*/
public function build($env = null)
{
Expand Down
5 changes: 0 additions & 5 deletions tests/ContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
use ByJG\Config\Definition;
use PHPUnit\Framework\TestCase;

// backward compatibility
if (!class_exists('\PHPUnit\Framework\TestCase')) {
class_alias('\PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase');
}

class ContainerTest extends TestCase
{
/**
Expand Down

0 comments on commit e9cd24e

Please sign in to comment.