2010-12-16 05:06:13 +01:00
|
|
|
<?php
|
2016-08-19 00:51:35 +02:00
|
|
|
|
2016-10-14 03:30:05 +02:00
|
|
|
namespace SilverStripe\Control\Tests;
|
|
|
|
|
2016-08-19 00:51:35 +02:00
|
|
|
use SilverStripe\Dev\SapphireTest;
|
|
|
|
use SilverStripe\Control\NullHTTPRequest;
|
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
class NullHTTPRequestTest extends SapphireTest
|
|
|
|
{
|
2010-12-16 05:06:13 +01:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
public function testAllHttpVerbsAreFalse()
|
|
|
|
{
|
|
|
|
$r = new NullHTTPRequest();
|
|
|
|
$this->assertFalse($r->isGET());
|
|
|
|
$this->assertFalse($r->isPOST());
|
|
|
|
$this->assertFalse($r->isPUT());
|
|
|
|
$this->assertFalse($r->isDELETE());
|
|
|
|
$this->assertFalse($r->isHEAD());
|
|
|
|
}
|
2014-08-15 08:53:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
public function testGetURL()
|
|
|
|
{
|
|
|
|
$r = new NullHTTPRequest();
|
|
|
|
$this->assertEquals('', $r->getURL());
|
|
|
|
}
|
2012-03-24 04:04:52 +01:00
|
|
|
}
|