Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add failing test for #2661

  • Loading branch information...
commit 0f2100767b1352e2c6712584eb7ea37d144558d8 1 parent 2fd15b6
Mark Story markstory authored
18 lib/Cake/Test/Case/View/ViewTest.php
@@ -994,6 +994,24 @@ public function testRenderUsingViewProperty() {
994 994 }
995 995
996 996 /**
  997 + * Test render()ing a file in a subdir from a custom viewPath
  998 + * in a plugin.
  999 + *
  1000 + * @return void
  1001 + */
  1002 + public function testGetViewFileNameSubdirWithPluginAndViewPath()
  1003 + {
  1004 + $this->PostsController->plugin = 'TestPlugin';
  1005 + $this->PostsController->viewPath = 'Elements';
  1006 + $this->PostsController->name = 'Posts';
  1007 + $View = new TestView($this->PostsController);
  1008 +
  1009 + $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' .
  1010 + DS . 'View' . DS . 'Elements' . DS . 'sub_dir' . DS . 'sub_element.ctp';
  1011 + $this->assertEquals($expected, $View->getViewFileName('sub_dir/sub_element'));
  1012 + }
  1013 +
  1014 +/**
997 1015 * test that view vars can replace the local helper variables
998 1016 * and not overwrite the $this->Helper references
999 1017 *
1  lib/Cake/Test/test_app/Plugin/TestPlugin/View/Elements/sub_dir/sub_element.ctp
... ... @@ -0,0 +1 @@
  1 +Content from TestPlugin.Elements/sub_dir/sub_element

0 comments on commit 0f21007

Please sign in to comment.
Something went wrong with that request. Please try again.