Skip to content

Commit

Permalink
Fixing remaining failing tests in PHPUnit 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Nov 5, 2011
1 parent d68053c commit bfd95d0
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
Expand Up @@ -629,7 +629,7 @@ public function testMapAlias() {
*/
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';
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Test/Case/Network/Email/SmtpTransportTest.php
Expand Up @@ -127,7 +127,7 @@ public function testConnectHelo() {
/**
* testConnectFail method
*
* @expectedException Exception
* @expectedException SocketException
* @return void
*/
public function testConnectFail() {
Expand Down Expand Up @@ -258,4 +258,4 @@ public function testQuit() {
$this->SmtpTransport->disconnect();
}

}
}
6 changes: 0 additions & 6 deletions lib/Cake/Test/Case/Routing/DispatcherTest.php
Expand Up @@ -1298,12 +1298,6 @@ public function testAssets() {
$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();
}
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Routing/RouterTest.php
Expand Up @@ -2225,10 +2225,10 @@ public function testUsingCustomRouteClass() {
/**
* test that route classes must extend CakeRoute
*
* @expectedException RouterException
* @return void
*/
public function testCustomRouteException() {
$this->expectException();
Router::connect('/:controller', array(), array('routeClass' => 'Object'));
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/View/Helper/JsHelperTest.php
Expand Up @@ -169,6 +169,7 @@ public function testConstruction() {
/**
* test that methods dispatch internally and to the engine class
*
* @expectedException PHPUnit_Framework_Error_Warning
* @return void
*/
public function testMethodDispatching() {
Expand All @@ -182,7 +183,6 @@ public function testMethodDispatching() {
$this->Js->event('click', 'callback');

$this->Js->TestJsEngine = new StdClass();
$this->expectError();
$this->Js->someMethodThatSurelyDoesntExist();
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php
Expand Up @@ -2175,6 +2175,7 @@ public function testAjaxLinkGenerationLink() {
/**
* test that mock classes injected into paginatorHelper are called when using link()
*
* @expectedException CakeException
* @return void
*/
public function testMockAjaxProviderClassInjection() {
Expand All @@ -2196,7 +2197,6 @@ public function testMockAjaxProviderClassInjection() {
$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'));
}

Expand Down

0 comments on commit bfd95d0

Please sign in to comment.