diff --git a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php index 4aa2f98f6..0c1c49f95 100644 --- a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php @@ -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'; diff --git a/lib/Cake/Test/Case/Network/Email/SmtpTransportTest.php b/lib/Cake/Test/Case/Network/Email/SmtpTransportTest.php index 5da648766..fca4b0029 100644 --- a/lib/Cake/Test/Case/Network/Email/SmtpTransportTest.php +++ b/lib/Cake/Test/Case/Network/Email/SmtpTransportTest.php @@ -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(); } -} \ No newline at end of file +} diff --git a/lib/Cake/Test/Case/Routing/DispatcherTest.php b/lib/Cake/Test/Case/Routing/DispatcherTest.php index 05ce608cd..f421e8e39 100644 --- a/lib/Cake/Test/Case/Routing/DispatcherTest.php +++ b/lib/Cake/Test/Case/Routing/DispatcherTest.php @@ -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(); - } - } } /** diff --git a/lib/Cake/Test/Case/Routing/RouterTest.php b/lib/Cake/Test/Case/Routing/RouterTest.php index f04fb4163..c9657dae9 100644 --- a/lib/Cake/Test/Case/Routing/RouterTest.php +++ b/lib/Cake/Test/Case/Routing/RouterTest.php @@ -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')); } diff --git a/lib/Cake/Test/Case/View/Helper/JsHelperTest.php b/lib/Cake/Test/Case/View/Helper/JsHelperTest.php index 131661284..d6de45598 100644 --- a/lib/Cake/Test/Case/View/Helper/JsHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/JsHelperTest.php @@ -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(); } diff --git a/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php b/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php index d57d3f435..ea96367c7 100644 --- a/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php @@ -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')); }