From ea2f0327f5268ff3dfa9a3707dbd33635371cf52 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 30 May 2010 11:16:40 -0400 Subject: [PATCH] Reverting change made in [7cde309]. Readding trim() to fix issues on windows. Updating tests so they continue to pass on macos. Fixes #769 --- cake/libs/file.php | 2 +- cake/tests/cases/libs/file.test.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cake/libs/file.php b/cake/libs/file.php index 90ac671bdcf..74ccc832bdc 100644 --- a/cake/libs/file.php +++ b/cake/libs/file.php @@ -186,7 +186,7 @@ public function read($bytes = false, $mode = 'rb', $force = false) { if ($bytes === false) { $this->close(); } - return $data; + return trim($data); } /** diff --git a/cake/tests/cases/libs/file.test.php b/cake/tests/cases/libs/file.test.php index 47b88b0b6da..d89fe930c2d 100644 --- a/cake/tests/cases/libs/file.test.php +++ b/cake/tests/cases/libs/file.test.php @@ -133,7 +133,7 @@ function testRead() { $this->File->lock = true; $result = $this->File->read(); $expecting = file_get_contents(__FILE__); - $this->assertEqual($result, $expecting); + $this->assertEqual($result, trim($expecting)); $this->File->lock = null; $data = $expecting;