for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ChatApp\Tests;
use PHPUnit_Framework_TestCase;
use ChatApp\Session;
class TestSession
extends
PHPUnit_Framework_TestCase
{
protected $array;
public function setUp()
$this->array['key'] = 'test';
$this->array['value'] = 'test';
Session::put($this->array['key'], $this->array['value']);
}
public function testGet()
$value = Session::get($this->array['key']);
$this->assertEquals($this->array['value'], $value);
public function tearDown()
Session::forget($this->array['key']);
$this->assertEquals(null, $value);