<?php

namespace Kotchasan;

/**
 * Generated by PHPUnit_SkeletonGenerator on 2017-06-28 at 13:11:30.
 */
class ViewTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var View
     */
    protected $object;

    /**
     * Sets up the fixture, for example, opens a network connection.
     * This method is called before a test is executed.
     */
    protected function setUp()
    {
        $this->object = new View();
    }

    /**
     * Tears down the fixture, for example, closes a network connection.
     * This method is called after a test is executed.
     */
    protected function tearDown()
    {

    }

    /**
     * Generated from @assert (array(2 => 'module=retmodule&id=0')) [==] "http://localhost/?module=retmodule&amp;page=1&amp;sort=id"  [[$_SERVER['QUERY_STRING'] = '_module=test&1234&_page=1&_sort=id&action=login&id=1']].
     *
     * @covers Kotchasan\View::back
     */
    public function testBack()
    {
        $_SERVER['QUERY_STRING'] = '_module=test&1234&_page=1&_sort=id&action=login&id=1';
        $this->assertEquals(
            "http://localhost/?module=retmodule&amp;page=1&amp;sort=id", \Kotchasan\View::back(array(2 => 'module=retmodule&id=0'))
        );
    }

    /**
     * Generated from @assert ('module=retmodule&5678') [==] "http://localhost/?module=retmodule&amp;page=1&amp;sort=id&amp;id=1&amp;5678".
     *
     * @covers Kotchasan\View::back
     */
    public function testBack2()
    {

        $this->assertEquals(
            "http://localhost/?module=retmodule&amp;page=1&amp;sort=id&amp;id=1&amp;5678", \Kotchasan\View::back('module=retmodule&5678')
        );
    }
}