* @license http://www.apache.org/licenses/LICENSE-2.0 * @link http://phpsx.org */ class DeleteRequestTest extends TestCase { public function testConstruct() { $request = new DeleteRequest(new Url('http://localhost.com/foo'), array('X-Foo' => 'bar'), 'foo'); $this->assertEquals('DELETE', $request->getMethod()); $this->assertEquals('localhost.com', $request->getHeader('Host')); $this->assertEquals('bar', $request->getHeader('X-Foo')); $this->assertEquals('foo', (string) $request->getBody()); } public function testConstructUrlHeader() { $request = new DeleteRequest(new Url('http://localhost.com/foo'), array('X-Foo' => 'bar')); $this->assertEquals('DELETE', $request->getMethod()); $this->assertEquals('localhost.com', $request->getHeader('Host')); $this->assertEquals('bar', $request->getHeader('X-Foo')); } public function testConstructUrl() { $request = new DeleteRequest(new Url('http://localhost.com/foo')); $this->assertEquals('DELETE', $request->getMethod()); $this->assertEquals('localhost.com', $request->getHeader('Host')); } public function testConstructUrlString() { $request = new DeleteRequest('http://localhost.com/foo'); $this->assertEquals('DELETE', $request->getMethod()); $this->assertEquals('localhost.com', $request->getHeader('Host')); } } __halt_compiler();----SIGNATURE:----fjBORs9s3lTQ2Uqs36ro1OV4KTgGfPz9xqZb3tUDKgFAm5zxCNGK+rNBeWOWkNmB7ryDhBoo3+PNKddFk6IIoUVucNRm+m4FOqd1A2pLVfvbVa3byInwZeXP+5XuINwxEfRc882TxeEQOVv9hBn4gg0SswcrJGxG3bSpY4AgflMboPS5j2jh4Di3yxeovArbjPIEfSF37mYFah+Loh1kkpgj0Ks4owd6XGv3l3rL4Npclu5faPwf7GooF3UD5jb2KfxiMVwelz+bQe0+k5+tyhVskya7J7+IILxmgF3GBTAjrmOl2s0iduH9oGoM87ZEsEWdMMNqac54+ChvVQWk9sfmR5mYj4G8dcm7TlXY/eiaQeq2oFPExV1rLrm26wgL1+UsfFOb0t18w0jw6OEpoPxOdDZ+qs7WoyQML+VPbYnkM86DSlhxGHZrH2X5iCjiWjhzUURazWB1DH0QG5qseRGE/WKZjPam5r8lKPldQPFXnrWWRa7lfu9uBIfDsFGlti9ODdQ/sHVapkq2XdctFohxUwc1LXFTWc9jydcQTFEVgyOk1pztq0UYGw1TxLGX5pv0C3ZSVS8oENigfbCjDzn/QhbdN5eM9qTEnIj+LcRaWMB/xU5A9qvNGF4ovkGLz75swzuckuMTJmWNHqSo2lV67z0iBZTG9cdcrhLSNqU=----ATTACHMENT:----OTI4OTk1NTQ2OTUzMzIgODM0NTY1NjYwNTkzMTQzMiA3NzY3MzQ1MDM5MDA3Mzc4