Skip to content

Commit

Permalink
Update PHPUnit version (PHP 7.2)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanjhv committed Jul 22, 2018
1 parent 920c539 commit 0205470
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"slim/slim": "^3.0"
},
"require-dev": {
"phpunit/phpunit": "4.7.*"
"phpunit/phpunit": "^7.0"
},
"autoload": {
"psr-4": {
Expand Down
23 changes: 12 additions & 11 deletions tests/HelperTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

use PHPUnit\Framework\TestCase;
use SlimSession\Helper;

session_start();

class HelperTest extends PHPUnit_Framework_TestCase
class HelperTest extends TestCase
{
protected function setUp()
{
Expand All @@ -13,7 +14,7 @@ protected function setUp()

public function testExists()
{
$helper = new Helper();
$helper = new Helper;

$_SESSION = $data = ['a' => 'A', 'b' => 'B', 'c' => 'C'];

Expand All @@ -29,7 +30,7 @@ public function testExists()

public function testSet()
{
$helper = new Helper();
$helper = new Helper;

$helper->set('a', 'A');
$this->assertSame(['a' => 'A'], $_SESSION);
Expand All @@ -43,7 +44,7 @@ public function testSet()

public function testMerge()
{
$helper = new Helper();
$helper = new Helper;
$helper->set('a', []);

$helper->merge('a', ['a' => 'A']);
Expand All @@ -58,7 +59,7 @@ public function testMerge()

public function testGet()
{
$helper = new Helper();
$helper = new Helper;

$_SESSION = ['a' => 'A', 'b' => 'B', 'c' => 'C'];

Expand All @@ -75,7 +76,7 @@ public function testGet()

public function testDelete()
{
$helper = new Helper();
$helper = new Helper;

$_SESSION = $data = ['a' => 'A', 'b' => 'B', 'c' => 'C'];

Expand All @@ -95,7 +96,7 @@ public function testDelete()

public function testClear()
{
$helper = new Helper();
$helper = new Helper;

$_SESSION = ['a' => 'A', 'b' => 'B', 'c' => 'C'];

Expand All @@ -108,7 +109,7 @@ public function testClear()
*/
public function testId()
{
$helper = new Helper();
$helper = new Helper;

$this->assertSame(session_id(), $helper::id());
$this->assertNotSame(session_id(), $sessionId = $helper::id(true));
Expand All @@ -120,7 +121,7 @@ public function testId()
*/
public function testDestroy()
{
$helper = new Helper();
$helper = new Helper;

$_SESSION = ['a' => 'A', 'b' => 'B', 'c' => 'C'];

Expand All @@ -139,7 +140,7 @@ public function testDestroy()

public function testCount()
{
$helper = new Helper();
$helper = new Helper;

$_SESSION = ['a' => 'A', 'b' => 'B', 'c' => 'C'];

Expand All @@ -148,7 +149,7 @@ public function testCount()

public function testIterator()
{
$helper = new Helper();
$helper = new Helper;

$_SESSION = ['a' => 'A', 'b' => 'B', 'c' => 'C'];

Expand Down

0 comments on commit 0205470

Please sign in to comment.