removed extra/unsupported arguments
This commit is contained in:
parent
f4adfc4d79
commit
4b7a275363
@ -34,7 +34,7 @@ class GenericEventTest extends \PHPUnit_Framework_TestCase
|
||||
parent::setUp();
|
||||
|
||||
$this->subject = new \stdClass();
|
||||
$this->event = new GenericEvent($this->subject, array('name' => 'Event'), 'foo');
|
||||
$this->event = new GenericEvent($this->subject, array('name' => 'Event'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -32,7 +32,7 @@ class PdoSessionHandlerTest extends \PHPUnit_Framework_TestCase
|
||||
public function testIncompleteOptions()
|
||||
{
|
||||
$this->setExpectedException('InvalidArgumentException');
|
||||
$storage = new PdoSessionHandler($this->pdo, array(), array());
|
||||
$storage = new PdoSessionHandler($this->pdo, array());
|
||||
}
|
||||
|
||||
public function testWrongPdoErrMode()
|
||||
@ -42,42 +42,42 @@ class PdoSessionHandlerTest extends \PHPUnit_Framework_TestCase
|
||||
$pdo->exec("CREATE TABLE sessions (sess_id VARCHAR(255) PRIMARY KEY, sess_data TEXT, sess_time INTEGER)");
|
||||
|
||||
$this->setExpectedException('InvalidArgumentException');
|
||||
$storage = new PdoSessionHandler($pdo, array('db_table' => 'sessions'), array());
|
||||
$storage = new PdoSessionHandler($pdo, array('db_table' => 'sessions'));
|
||||
}
|
||||
|
||||
public function testWrongTableOptionsWrite()
|
||||
{
|
||||
$storage = new PdoSessionHandler($this->pdo, array('db_table' => 'bad_name'), array());
|
||||
$storage = new PdoSessionHandler($this->pdo, array('db_table' => 'bad_name'));
|
||||
$this->setExpectedException('RuntimeException');
|
||||
$storage->write('foo', 'bar');
|
||||
}
|
||||
|
||||
public function testWrongTableOptionsRead()
|
||||
{
|
||||
$storage = new PdoSessionHandler($this->pdo, array('db_table' => 'bad_name'), array());
|
||||
$storage = new PdoSessionHandler($this->pdo, array('db_table' => 'bad_name'));
|
||||
$this->setExpectedException('RuntimeException');
|
||||
$storage->read('foo', 'bar');
|
||||
}
|
||||
|
||||
public function testWriteRead()
|
||||
{
|
||||
$storage = new PdoSessionHandler($this->pdo, array('db_table' => 'sessions'), array());
|
||||
$storage = new PdoSessionHandler($this->pdo, array('db_table' => 'sessions'));
|
||||
$storage->write('foo', 'bar');
|
||||
$this->assertEquals('bar', $storage->read('foo'), 'written value can be read back correctly');
|
||||
}
|
||||
|
||||
public function testMultipleInstances()
|
||||
{
|
||||
$storage1 = new PdoSessionHandler($this->pdo, array('db_table' => 'sessions'), array());
|
||||
$storage1 = new PdoSessionHandler($this->pdo, array('db_table' => 'sessions'));
|
||||
$storage1->write('foo', 'bar');
|
||||
|
||||
$storage2 = new PdoSessionHandler($this->pdo, array('db_table' => 'sessions'), array());
|
||||
$storage2 = new PdoSessionHandler($this->pdo, array('db_table' => 'sessions'));
|
||||
$this->assertEquals('bar', $storage2->read('foo'), 'values persist between instances');
|
||||
}
|
||||
|
||||
public function testSessionDestroy()
|
||||
{
|
||||
$storage = new PdoSessionHandler($this->pdo, array('db_table' => 'sessions'), array());
|
||||
$storage = new PdoSessionHandler($this->pdo, array('db_table' => 'sessions'));
|
||||
$storage->write('foo', 'bar');
|
||||
$this->assertCount(1, $this->pdo->query('SELECT * FROM sessions')->fetchAll());
|
||||
|
||||
@ -88,7 +88,7 @@ class PdoSessionHandlerTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testSessionGC()
|
||||
{
|
||||
$storage = new PdoSessionHandler($this->pdo, array('db_table' => 'sessions'), array());
|
||||
$storage = new PdoSessionHandler($this->pdo, array('db_table' => 'sessions'));
|
||||
|
||||
$storage->write('foo', 'bar');
|
||||
$storage->write('baz', 'bar');
|
||||
|
@ -40,7 +40,7 @@ class ApacheUrlMatcherTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$_SERVER = $server;
|
||||
|
||||
$result = $matcher->match($pathinfo, $server);
|
||||
$result = $matcher->match($pathinfo);
|
||||
$this->assertSame(var_export($expect, true), var_export($result, true));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user