MediaWiki REL1_33
DerivativeRequestTest.php
Go to the documentation of this file.
1<?php
2
6class DerivativeRequestTest extends PHPUnit\Framework\TestCase {
7
8 public function testSetIp() {
9 $original = new WebRequest();
10 $original->setIP( '1.2.3.4' );
11 $derivative = new DerivativeRequest( $original, [] );
12
13 $this->assertEquals( '1.2.3.4', $derivative->getIP() );
14
15 $derivative->setIP( '5.6.7.8' );
16
17 $this->assertEquals( '5.6.7.8', $derivative->getIP() );
18 $this->assertEquals( '1.2.3.4', $original->getIP() );
19 }
20
21}
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
Similar to FauxRequest, but only fakes URL parameters and method (POST or GET) and use the base reque...
The WebRequest class encapsulates getting at data passed in the URL or via a POSTed form stripping il...