From a496cf3198b017dae4895fc3f5dfe983ac46d77a Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 15 Mar 2016 22:27:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/View.php | 2 +- tests/thinkphp/library/think/viewTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/think/View.php b/library/think/View.php index 8e1bcc78..cff28228 100644 --- a/library/think/View.php +++ b/library/think/View.php @@ -260,7 +260,7 @@ class View $template = str_replace('.', DS, CONTROLLER_NAME) . $depr . $template; } } - return realpath($path) . DS . $template . $this->config['view_suffix']; + return $path . $template . $this->config['view_suffix']; } /** diff --git a/tests/thinkphp/library/think/viewTest.php b/tests/thinkphp/library/think/viewTest.php index 741f5457..590b258b 100644 --- a/tests/thinkphp/library/think/viewTest.php +++ b/tests/thinkphp/library/think/viewTest.php @@ -124,9 +124,9 @@ class viewTest extends \PHPUnit_Framework_TestCase $method = new \ReflectionMethod('\think\View', 'ParseTemplate'); $method->setAccessible(true); if (defined('CONTROLLER_NAME')) { - $expect_data = DS . 'theme_name' . DS . CONTROLLER_NAME . DS . 'template_name.html'; + $expect_data = 'view_path' . 'theme_name' . DS . CONTROLLER_NAME . DS . 'template_name.html'; } else { - $expect_data = DS . 'theme_name' . DS . 'template_name.html'; + $expect_data = 'view_path' . 'theme_name' . DS . 'template_name.html'; } $this->assertEquals($expect_data, $method->invoke($view_instance, 'template_name')); }