mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fixing remaining failing tests in PHPUnit 3.6
This commit is contained in:
parent
d68053c4d4
commit
bfd95d0e04
6 changed files with 6 additions and 12 deletions
|
@ -629,7 +629,7 @@ class RequestHandlerComponentTest extends CakeTestCase {
|
|||
*/
|
||||
public function testAccepts() {
|
||||
$_SERVER['HTTP_ACCEPT'] = 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5';
|
||||
$this->assertEqual($this->RequestHandler->accepts(array('js', 'xml', 'html')), 'xml');
|
||||
$this->assertTrue($this->RequestHandler->accepts(array('js', 'xml', 'html')));
|
||||
$this->assertFalse($this->RequestHandler->accepts(array('gif', 'jpeg', 'foo')));
|
||||
|
||||
$_SERVER['HTTP_ACCEPT'] = '*/*;q=0.5';
|
||||
|
|
|
@ -127,7 +127,7 @@ class SmtpTransportTest extends CakeTestCase {
|
|||
/**
|
||||
* testConnectFail method
|
||||
*
|
||||
* @expectedException Exception
|
||||
* @expectedException SocketException
|
||||
* @return void
|
||||
*/
|
||||
public function testConnectFail() {
|
||||
|
@ -258,4 +258,4 @@ class SmtpTransportTest extends CakeTestCase {
|
|||
$this->SmtpTransport->disconnect();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1298,12 +1298,6 @@ class DispatcherTest extends CakeTestCase {
|
|||
$expected = filesize(CakePlugin::path('TestPlugin') . 'webroot' . DS . 'css' . DS . 'unknown.extension');
|
||||
$headers = $response->header();
|
||||
$this->assertEqual($expected, $headers['Content-Length']);
|
||||
|
||||
if (php_sapi_name() == 'cli') {
|
||||
while (ob_get_level()) {
|
||||
ob_get_clean();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2225,10 +2225,10 @@ class RouterTest extends CakeTestCase {
|
|||
/**
|
||||
* test that route classes must extend CakeRoute
|
||||
*
|
||||
* @expectedException RouterException
|
||||
* @return void
|
||||
*/
|
||||
public function testCustomRouteException() {
|
||||
$this->expectException();
|
||||
Router::connect('/:controller', array(), array('routeClass' => 'Object'));
|
||||
}
|
||||
|
||||
|
|
|
@ -169,6 +169,7 @@ class JsHelperTest extends CakeTestCase {
|
|||
/**
|
||||
* test that methods dispatch internally and to the engine class
|
||||
*
|
||||
* @expectedException PHPUnit_Framework_Error_Warning
|
||||
* @return void
|
||||
*/
|
||||
public function testMethodDispatching() {
|
||||
|
@ -182,7 +183,6 @@ class JsHelperTest extends CakeTestCase {
|
|||
$this->Js->event('click', 'callback');
|
||||
|
||||
$this->Js->TestJsEngine = new StdClass();
|
||||
$this->expectError();
|
||||
$this->Js->someMethodThatSurelyDoesntExist();
|
||||
}
|
||||
|
||||
|
|
|
@ -2175,6 +2175,7 @@ class PaginatorHelperTest extends CakeTestCase {
|
|||
/**
|
||||
* test that mock classes injected into paginatorHelper are called when using link()
|
||||
*
|
||||
* @expectedException CakeException
|
||||
* @return void
|
||||
*/
|
||||
public function testMockAjaxProviderClassInjection() {
|
||||
|
@ -2196,7 +2197,6 @@ class PaginatorHelperTest extends CakeTestCase {
|
|||
$Paginator->PaginatorMockJs->expects($this->once())->method('link');
|
||||
$result = $Paginator->link('Page 2', array('page' => 2), array('update' => '#content'));
|
||||
|
||||
$this->expectException();
|
||||
$Paginator = new PaginatorHelper($this->View, array('ajax' => 'Form'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue