Skip to content

Commit

Permalink
Fixed tests and typo
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Mar 5, 2016
1 parent 0c232eb commit 94515a0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 51 deletions.
2 changes: 1 addition & 1 deletion src/TestSuite/IntegrationTestCase.php
Expand Up @@ -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.
Expand Down
50 changes: 0 additions & 50 deletions tests/TestCase/Network/ResponseTest.php
Expand Up @@ -1228,8 +1228,6 @@ public function testFile()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);

$response->expects($this->exactly(1))
Expand All @@ -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));
Expand Down Expand Up @@ -1271,8 +1266,6 @@ public function testFileWithDownloadAndName()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);

$response->expects($this->exactly(1))
Expand All @@ -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));
Expand Down Expand Up @@ -1331,8 +1321,6 @@ public function testFileWithUnknownFileTypeGeneric()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);

$response->expects($this->exactly(1))
Expand All @@ -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));
Expand Down Expand Up @@ -1388,8 +1373,6 @@ public function testFileWithUnknownFileTypeOpera()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);

$response->expects($this->at(0))
Expand All @@ -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));
Expand Down Expand Up @@ -1449,8 +1430,6 @@ public function testFileWithUnknownFileTypeIE()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);

$response->expects($this->at(0))
Expand All @@ -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));
Expand Down Expand Up @@ -1511,8 +1488,6 @@ public function testFileWithUnknownFileNoDownload()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);

$response->expects($this->exactly(1))
Expand Down Expand Up @@ -1567,8 +1542,6 @@ public function testConnectionAbortedOnBuffering()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);

$response->expects($this->any())
Expand All @@ -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();
Expand All @@ -1603,8 +1573,6 @@ public function testFileUpperExtension()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);

$response->expects($this->any())
Expand Down Expand Up @@ -1633,8 +1601,6 @@ public function testFileExtensionNotSet()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);

$response->expects($this->any())
Expand Down Expand Up @@ -1688,8 +1654,6 @@ public function testFileRangeOffsets($range, $length, $offsetResponse)
'type',
'_sendHeader',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);

$response->expects($this->at(1))
Expand Down Expand Up @@ -1739,8 +1703,6 @@ public function testFileRange()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);

$response->expects($this->exactly(1))
Expand All @@ -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));
Expand Down Expand Up @@ -1800,8 +1760,6 @@ public function testFileRangeInvalid()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);

$response->expects($this->at(1))
Expand Down Expand Up @@ -1845,8 +1803,6 @@ public function testFileRangeOffsetsNoDownload($range, $length, $offsetResponse)
'type',
'_sendHeader',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);

$response->expects($this->at(1))
Expand Down Expand Up @@ -1888,8 +1844,6 @@ public function testFileRangeNoDownload()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);

$response->expects($this->exactly(1))
Expand All @@ -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));
Expand Down Expand Up @@ -1941,8 +1893,6 @@ public function testFileRangeInvalidNoDownload()
'_sendHeader',
'_setContentType',
'_isActive',
'_clearBuffer',
'_flushBuffer'
]);

$response->expects($this->at(1))
Expand Down

0 comments on commit 94515a0

Please sign in to comment.