@@ -147,20 +147,20 @@ function tearDown() {
147
147
function testPluginThemedGetTemplate () {
148
148
$ this ->Controller ->plugin = 'TestPlugin ' ;
149
149
$ this ->Controller ->name = 'TestPlugin ' ;
150
- $ this ->Controller ->viewPath = 'tests ' ;
150
+ $ this ->Controller ->viewPath = 'Tests ' ;
151
151
$ this ->Controller ->action = 'index ' ;
152
152
$ this ->Controller ->theme = 'test_theme ' ;
153
153
154
154
$ ThemeView = new TestThemeView ($ this ->Controller );
155
- $ expected = LIBS . 'Test ' . DS . 'test_app ' . DS . 'View ' . DS . 'Themed ' . DS . 'test_theme ' . DS . 'plugins ' . DS . 'TestPlugin ' . DS . 'tests ' . DS .'index.ctp ' ;
155
+ $ expected = LIBS . 'Test ' . DS . 'test_app ' . DS . 'View ' . DS . 'Themed ' . DS . 'test_theme ' . DS . 'Plugins ' . DS . 'TestPlugin ' . DS . 'Tests ' . DS .'index.ctp ' ;
156
156
$ result = $ ThemeView ->getViewFileName ('index ' );
157
157
$ this ->assertEqual ($ result , $ expected );
158
158
159
- $ expected = LIBS . 'Test ' . DS . 'test_app ' . DS . 'View ' . DS . 'Themed ' . DS . 'test_theme ' . DS . 'plugins ' . DS . 'TestPlugin ' . DS . 'layouts ' . DS .'plugin_default.ctp ' ;
159
+ $ expected = LIBS . 'Test ' . DS . 'test_app ' . DS . 'View ' . DS . 'Themed ' . DS . 'test_theme ' . DS . 'Plugins ' . DS . 'TestPlugin ' . DS . 'Layouts ' . DS .'plugin_default.ctp ' ;
160
160
$ result = $ ThemeView ->getLayoutFileName ('plugin_default ' );
161
161
$ this ->assertEqual ($ result , $ expected );
162
162
163
- $ expected = LIBS . 'Test ' . DS . 'test_app ' . DS . 'View ' . DS . 'Themed ' . DS . 'test_theme ' . DS . 'layouts ' . DS .'default.ctp ' ;
163
+ $ expected = LIBS . 'Test ' . DS . 'test_app ' . DS . 'View ' . DS . 'Themed ' . DS . 'test_theme ' . DS . 'Layouts ' . DS .'default.ctp ' ;
164
164
$ result = $ ThemeView ->getLayoutFileName ('default ' );
165
165
$ this ->assertEqual ($ result , $ expected );
166
166
}
@@ -174,31 +174,31 @@ function testPluginThemedGetTemplate() {
174
174
function testGetTemplate () {
175
175
$ this ->Controller ->plugin = null ;
176
176
$ this ->Controller ->name = 'Pages ' ;
177
- $ this ->Controller ->viewPath = 'pages ' ;
177
+ $ this ->Controller ->viewPath = 'Pages ' ;
178
178
$ this ->Controller ->action = 'display ' ;
179
179
$ this ->Controller ->params ['pass ' ] = array ('home ' );
180
180
181
181
$ ThemeView = new TestThemeView ($ this ->Controller );
182
182
$ ThemeView ->theme = 'test_theme ' ;
183
- $ expected = LIBS . 'Test ' . DS . 'test_app ' . DS . 'View ' . DS .'pages ' . DS .'home.ctp ' ;
183
+ $ expected = LIBS . 'Test ' . DS . 'test_app ' . DS . 'View ' . DS .'Pages ' . DS .'home.ctp ' ;
184
184
$ result = $ ThemeView ->getViewFileName ('home ' );
185
185
$ this ->assertEqual ($ result , $ expected );
186
186
187
- $ expected = LIBS . 'Test ' . DS . 'test_app ' . DS . 'View ' . DS . 'Themed ' . DS . 'test_theme ' . DS . 'posts ' . DS .'index.ctp ' ;
188
- $ result = $ ThemeView ->getViewFileName ('/posts /index ' );
187
+ $ expected = LIBS . 'Test ' . DS . 'test_app ' . DS . 'View ' . DS . 'Themed ' . DS . 'test_theme ' . DS . 'Posts ' . DS .'index.ctp ' ;
188
+ $ result = $ ThemeView ->getViewFileName ('/Posts /index ' );
189
189
$ this ->assertEqual ($ result , $ expected );
190
190
191
- $ expected = LIBS . 'Test ' . DS . 'test_app ' . DS . 'View ' . DS . 'Themed ' . DS . 'test_theme ' . DS . 'layouts ' . DS .'default.ctp ' ;
191
+ $ expected = LIBS . 'Test ' . DS . 'test_app ' . DS . 'View ' . DS . 'Themed ' . DS . 'test_theme ' . DS . 'Layouts ' . DS .'default.ctp ' ;
192
192
$ result = $ ThemeView ->getLayoutFileName ();
193
193
$ this ->assertEqual ($ result , $ expected );
194
194
195
195
$ ThemeView ->layoutPath = 'rss ' ;
196
- $ expected = LIBS . 'Test ' . DS . 'test_app ' . DS . 'View ' . DS . 'layouts ' . DS . 'rss ' . DS . 'default.ctp ' ;
196
+ $ expected = LIBS . 'Test ' . DS . 'test_app ' . DS . 'View ' . DS . 'Layouts ' . DS . 'rss ' . DS . 'default.ctp ' ;
197
197
$ result = $ ThemeView ->getLayoutFileName ();
198
198
$ this ->assertEqual ($ result , $ expected );
199
199
200
200
$ ThemeView ->layoutPath = 'emails ' . DS . 'html ' ;
201
- $ expected = LIBS . 'Test ' . DS . 'test_app ' . DS . 'View ' . DS . 'layouts ' . DS . 'emails ' . DS . 'html ' . DS . 'default.ctp ' ;
201
+ $ expected = LIBS . 'Test ' . DS . 'test_app ' . DS . 'View ' . DS . 'Layouts ' . DS . 'emails ' . DS . 'html ' . DS . 'default.ctp ' ;
202
202
$ result = $ ThemeView ->getLayoutFileName ();
203
203
$ this ->assertEqual ($ result , $ expected );
204
204
}
@@ -213,7 +213,7 @@ function testGetTemplate() {
213
213
function testMissingView () {
214
214
$ this ->Controller ->plugin = null ;
215
215
$ this ->Controller ->name = 'Pages ' ;
216
- $ this ->Controller ->viewPath = 'pages ' ;
216
+ $ this ->Controller ->viewPath = 'Pages ' ;
217
217
$ this ->Controller ->action = 'display ' ;
218
218
$ this ->Controller ->theme = 'my_theme ' ;
219
219
0 commit comments