Skip to content
Permalink
Browse files

Fixed tests and typo

  • Loading branch information...
lorenzo committed Mar 5, 2016
1 parent 0c232eb commit 94515a0f1a03cdbac34721a35f80f1abc48e3939
Showing with 1 addition and 51 deletions.
  1. +1 −1 src/TestSuite/IntegrationTestCase.php
  2. +0 −50 tests/TestCase/Network/ResponseTest.php
@@ -888,7 +888,7 @@ public function assertCookieEncrypted($expected, $name, $encrypt = 'aes', $key =
}
/**
* Asserts that a file with the fiven name was sent in the response
* Asserts that a file with the given name was sent in the response
*
* @param string $expected The file name that should be sent in the response
* @param string $message The failure message that will be appended to the generated message.
@@ -1228,8 +1228,6 @@ public function testFile()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);
$response->expects($this->exactly(1))
@@ -1241,9 +1239,6 @@ public function testFile()
->method('header')
->with('Accept-Ranges', 'bytes');
$response->expects($this->once())->method('_clearBuffer');
$response->expects($this->once())->method('_flushBuffer');
$response->expects($this->exactly(1))
->method('_isActive')
->will($this->returnValue(true));
@@ -1271,8 +1266,6 @@ public function testFileWithDownloadAndName()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);
$response->expects($this->exactly(1))
@@ -1292,9 +1285,6 @@ public function testFileWithDownloadAndName()
->method('header')
->with('Accept-Ranges', 'bytes');
$response->expects($this->once())->method('_clearBuffer');
$response->expects($this->once())->method('_flushBuffer');
$response->expects($this->exactly(1))
->method('_isActive')
->will($this->returnValue(true));
@@ -1331,8 +1321,6 @@ public function testFileWithUnknownFileTypeGeneric()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);
$response->expects($this->exactly(1))
@@ -1352,9 +1340,6 @@ public function testFileWithUnknownFileTypeGeneric()
->method('header')
->with('Accept-Ranges', 'bytes');
$response->expects($this->once())->method('_clearBuffer');
$response->expects($this->once())->method('_flushBuffer');
$response->expects($this->exactly(1))
->method('_isActive')
->will($this->returnValue(true));
@@ -1388,8 +1373,6 @@ public function testFileWithUnknownFileTypeOpera()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);
$response->expects($this->at(0))
@@ -1414,8 +1397,6 @@ public function testFileWithUnknownFileTypeOpera()
->method('header')
->with('Accept-Ranges', 'bytes');
$response->expects($this->once())->method('_clearBuffer');
$response->expects($this->once())->method('_flushBuffer');
$response->expects($this->exactly(1))
->method('_isActive')
->will($this->returnValue(true));
@@ -1449,8 +1430,6 @@ public function testFileWithUnknownFileTypeIE()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);
$response->expects($this->at(0))
@@ -1475,8 +1454,6 @@ public function testFileWithUnknownFileTypeIE()
->method('header')
->with('Accept-Ranges', 'bytes');
$response->expects($this->once())->method('_clearBuffer');
$response->expects($this->once())->method('_flushBuffer');
$response->expects($this->exactly(1))
->method('_isActive')
->will($this->returnValue(true));
@@ -1511,8 +1488,6 @@ public function testFileWithUnknownFileNoDownload()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);
$response->expects($this->exactly(1))
@@ -1567,8 +1542,6 @@ public function testConnectionAbortedOnBuffering()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);
$response->expects($this->any())
@@ -1580,9 +1553,6 @@ public function testConnectionAbortedOnBuffering()
->method('_isActive')
->will($this->returnValue(false));
$response->expects($this->once())->method('_clearBuffer');
$response->expects($this->never())->method('_flushBuffer');
$response->file(TEST_APP . 'vendor/css/test_asset.css');
$result = $response->send();
@@ -1603,8 +1573,6 @@ public function testFileUpperExtension()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);
$response->expects($this->any())
@@ -1633,8 +1601,6 @@ public function testFileExtensionNotSet()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);
$response->expects($this->any())
@@ -1688,8 +1654,6 @@ public function testFileRangeOffsets($range, $length, $offsetResponse)
'type',
'_sendHeader',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);
$response->expects($this->at(1))
@@ -1739,8 +1703,6 @@ public function testFileRange()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);
$response->expects($this->exactly(1))
@@ -1767,8 +1729,6 @@ public function testFileRange()
'Content-Range' => 'bytes 8-25/38',
]);
$response->expects($this->once())->method('_clearBuffer');
$response->expects($this->any())
->method('_isActive')
->will($this->returnValue(true));
@@ -1800,8 +1760,6 @@ public function testFileRangeInvalid()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);
$response->expects($this->at(1))
@@ -1845,8 +1803,6 @@ public function testFileRangeOffsetsNoDownload($range, $length, $offsetResponse)
'type',
'_sendHeader',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);
$response->expects($this->at(1))
@@ -1888,8 +1844,6 @@ public function testFileRangeNoDownload()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);
$response->expects($this->exactly(1))
@@ -1908,8 +1862,6 @@ public function testFileRangeNoDownload()
'Content-Range' => 'bytes 8-25/38',
]);
$response->expects($this->once())->method('_clearBuffer');
$response->expects($this->any())
->method('_isActive')
->will($this->returnValue(true));
@@ -1941,8 +1893,6 @@ public function testFileRangeInvalidNoDownload()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);
$response->expects($this->at(1))

0 comments on commit 94515a0

Please sign in to comment.
You can’t perform that action at this time.