Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing failures from merging.

  • Loading branch information...
commit 3e4388d7d7370883015d26ac69a68779d696e329 1 parent 91a1cf8
@markstory markstory authored
View
4 lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php
@@ -519,8 +519,8 @@ public function testDeleteRemovesChildren() {
* @return void
*/
function testDeleteChildrenNotExist() {
- $this->assertNull($this->Controller->Cookie->delete('NotFound'));
- $this->assertNull($this->Controller->Cookie->delete('Not.Found'));
+ $this->assertNull($this->Cookie->delete('NotFound'));
+ $this->assertNull($this->Cookie->delete('Not.Found'));
}
/**
View
13 lib/Cake/Test/Case/View/MediaViewTest.php
@@ -370,11 +370,16 @@ function testRenderUpperExtesnion() {
'extension' => 'JPG',
);
- $result = $this->MediaView->render();
+ $this->MediaView->response->expects($this->any())
+ ->method('type')
+ ->with('jpg')
+ ->will($this->returnArgument(0));
- $fileName = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors' . DS .'img' . DS . 'test_2.JPG';
- $file = file_get_contents($fileName, 'r');
- $this->assertEqual(base64_encode($output), base64_encode($file));
+ $this->MediaView->expects($this->at(0))
+ ->method('_isActive')
+ ->will($this->returnValue(true));
+
+ $this->MediaView->render();
}
}
View
4 lib/Cake/Utility/Validation.php
@@ -18,6 +18,10 @@
*/
App::uses('Multibyte', 'I18n');
+// Load multibyte if the extension is missing.
+if (!function_exists('mb_strlen')) {
+ class_exists('Multibyte');
+}
/**
* Offers different validation methods.
View
4 lib/Cake/View/Helper/TextHelper.php
@@ -224,6 +224,10 @@ public function truncate($text, $length = 100, $options = array()) {
$options = array_merge($default, $options);
extract($options);
+ if (!function_exists('mb_strlen')) {
+ class_exists('Multibyte');
+ }
+
if ($html) {
if (mb_strlen(preg_replace('/<.*?>/', '', $text)) <= $length) {
return $text;
Please sign in to comment.
Something went wrong with that request. Please try again.