Browse Source

Adjust test suite

Jordi Boggiano 11 years ago
parent
commit
5067d76dbc
1 changed files with 2 additions and 9 deletions
  1. 2 9
      tests/Composer/Test/Util/RemoteFilesystemTest.php

+ 2 - 9
tests/Composer/Test/Util/RemoteFilesystemTest.php

@@ -130,18 +130,11 @@ class RemoteFilesystemTest extends \PHPUnit_Framework_TestCase
         $this->assertAttributeEquals(50, 'lastProgress', $fs);
     }
 
-    public function testCallbackGetNotifyFailure404()
+    public function testCallbackGetPassesThrough404()
     {
         $fs = new RemoteFilesystem($this->getMock('Composer\IO\IOInterface'));
 
-        try {
-            $this->callCallbackGet($fs, STREAM_NOTIFY_FAILURE, 0, 'HTTP/1.1 404 Not Found', 404, 0, 0);
-            $this->fail();
-        } catch (\Exception $e) {
-            $this->assertInstanceOf('Composer\Downloader\TransportException', $e);
-            $this->assertEquals(404, $e->getCode());
-            $this->assertContains('HTTP/1.1 404 Not Found', $e->getMessage());
-        }
+        $this->assertNull($this->callCallbackGet($fs, STREAM_NOTIFY_FAILURE, 0, 'HTTP/1.1 404 Not Found', 404, 0, 0));
     }
 
     public function testCaptureAuthenticationParamsFromUrl()