Skip to content

Commit

Permalink
Upgrade to PHPUnit 6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
nohponex committed Jun 19, 2017
1 parent fb9f939 commit 498405b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 29 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"phramework/operator": "dev-master"
},
"require-dev": {
"phpunit/phpunit": "5.*",
"phpunit/phpunit": "6.*",
"squizlabs/php_codesniffer": "*",
"satooshi/php-coveralls": "dev-master",
"codacy/coverage": "^1.0",
Expand Down
18 changes: 3 additions & 15 deletions tests/src/ExpressionParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@
*/
namespace Phramework\ExpressionParser;

use PHPUnit\Framework\TestCase;

/**
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache-2.0
* @author Xenofon Spafaridis <nohponex@gmail.com>
* @coversDefaultClass Phramework\ExpressionParser\ExpressionParser
*/
class ExpressionParserTest extends \PHPUnit_Framework_TestCase
class ExpressionParserTest extends TestCase
{
/**
* @var ExpressionParser
Expand All @@ -42,15 +44,6 @@ public function setUp()
}

/**
* @covers ::__construct
*/
public function testConstruct()
{
new ExpressionParser(Language::getDefault());
}

/**
* @covers ::evaluate
*/
public function testEvaluateLiteral()
{
Expand All @@ -74,7 +67,6 @@ public function testEvaluateLiteral()
}

/**
* @covers ::evaluate
*/
public function testEvaluate()
{
Expand Down Expand Up @@ -117,7 +109,6 @@ public function testEvaluate()
}

/**
* @covers ::evaluate
*/
public function testEvaluateQuote()
{
Expand All @@ -135,7 +126,6 @@ public function testEvaluateQuote()
}

/**
* @covers ::evaluate
*/
public function testEvaluateInput()
{
Expand All @@ -147,7 +137,6 @@ public function testEvaluateInput()
}

/**
* @covers ::evaluate
*/
public function testCustomLanguage()
{
Expand Down Expand Up @@ -189,7 +178,6 @@ function(bool $l, bool $r) {
}

/**
* @covers ::evaluate
*/
public function testComplex()
{
Expand Down
17 changes: 5 additions & 12 deletions tests/src/LanguageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,15 @@
*/
namespace Phramework\ExpressionParser;

use Phramework\Operator\Operator;
use PHPUnit\Framework\TestCase;

/**
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache-2.0
* @author Xenofon Spafaridis <nohponex@gmail.com>
* @coversDefaultClass Phramework\ExpressionParser\Language
*/
class LanguageTest extends \PHPUnit_Framework_TestCase
class LanguageTest extends TestCase
{

/**
* @covers ::__construct
*/
public function testConstruct()
{
$l = (new Language());
Expand All @@ -39,19 +35,17 @@ public function testConstruct()
);
}

/**
* @covers ::set
*/
public static function testSet()
public function testSet()
{
$l = (new Language())
->set('max', LanguageUtil::getMethod('max'));

$this->assertTrue($l->isset('max'));

return $l;
}

/**
* @covers ::isset
* @depends testSet
*/
public function testIsset(Language $language)
Expand All @@ -66,7 +60,6 @@ public function testIsset(Language $language)
}

/**
* @covers ::get
* @depends testSet
*/
public function testGet(Language $language)
Expand Down
3 changes: 2 additions & 1 deletion tests/src/LanguageUtilTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@
*/
namespace Phramework\ExpressionParser;

use PHPUnit\Framework\TestCase;
use Phramework\Operator\Operator;

/**
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache-2.0
* @author Xenofon Spafaridis <nohponex@gmail.com>
* @coversDefaultClass Phramework\ExpressionParser\LanguageUtil
*/
class LanguageUtilTest extends \PHPUnit_Framework_TestCase
class LanguageUtilTest extends TestCase
{
public function testMax()
{
Expand Down

0 comments on commit 498405b

Please sign in to comment.