2013-10-03 12:48:02 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once (dirname(__FILE__) . "/config_test.php");
|
|
|
|
require_once (dirname(__FILE__) . "/../base.php");
|
|
|
|
|
|
|
|
class StackTest extends PHPUnit_Framework_TestCase
|
|
|
|
{
|
|
|
|
public function testAddURLParameter ()
|
|
|
|
{
|
|
|
|
$this->assertEquals ("?db=0", addURLParameter ("?", "db", "0"));
|
|
|
|
$this->assertEquals ("?key=value&db=0", addURLParameter ("?key=value", "db", "0"));
|
|
|
|
$this->assertEquals ("?key=value&otherKey=&db=0", addURLParameter ("?key=value&otherKey", "db", "0"));
|
|
|
|
}
|
2013-10-03 09:38:58 +03:00
|
|
|
}
|