Browse Source

Merge branch 'master' into 3.next

ADmad 7 years ago
parent
commit
44c48e60a3

+ 6 - 1
src/Controller/Component/RequestHandlerComponent.php

@@ -21,6 +21,7 @@ use Cake\Core\App;
 use Cake\Core\Configure;
 use Cake\Core\Exception\Exception;
 use Cake\Event\Event;
+use Cake\Http\Exception\NotFoundException;
 use Cake\Http\Response;
 use Cake\Routing\Router;
 use Cake\Utility\Exception\XmlException;
@@ -322,6 +323,7 @@ class RequestHandlerComponent extends Component
      *
      * @param \Cake\Event\Event $event The Controller.beforeRender event.
      * @return bool false if the render process should be aborted
+     * @throws \Cake\Http\Exception\NotFoundException If invoked extension is not configured.
      */
     public function beforeRender(Event $event)
     {
@@ -334,8 +336,11 @@ class RequestHandlerComponent extends Component
             !in_array($this->ext, ['html', 'htm']) &&
             $response->getMimeType($this->ext)
         );
+        if ($this->ext && !$isRecognized) {
+            throw new NotFoundException('Invoked extension not recognized/configured: ' . $this->ext);
+        }
 
-        if ($this->ext && $isRecognized) {
+        if ($this->ext) {
             $this->renderAs($controller, $this->ext);
             $response = $controller->response;
         } else {

+ 17 - 1
src/Http/Response.php

@@ -1111,7 +1111,7 @@ class Response implements ResponseInterface
     {
         deprecationWarning(
             'Response::type() is deprecated. ' .
-            'Use getType() or withType() instead.'
+            'Use setTypeMap(), getType() or withType() instead.'
         );
 
         if ($contentType === null) {
@@ -1138,6 +1138,22 @@ class Response implements ResponseInterface
     }
 
     /**
+     * Sets a content type definition into the map.
+     *
+     * E.g.: setTypeMap('xhtml', ['application/xhtml+xml', 'application/xhtml'])
+     *
+     * This is needed for RequestHandlerComponent and recognition of types.
+     *
+     * @param string $type Content type.
+     * @param string|array $mimeType Definition of the mime type.
+     * @return void
+     */
+    public function setTypeMap($type, $mimeType)
+    {
+        $this->_mimeTypes[$type] = $mimeType;
+    }
+
+    /**
      * Returns the current content type.
      *
      * @return string

+ 2 - 2
src/ORM/Association/BelongsToMany.php

@@ -825,12 +825,12 @@ class BelongsToMany extends Association
         $targetPrimaryKey = (array)$target->getPrimaryKey();
         $bindingKey = (array)$this->getBindingKey();
         $jointProperty = $this->_junctionProperty;
-        $junctionAlias = $junction->getAlias();
+        $junctionRegistryAlias = $junction->getRegistryAlias();
 
         foreach ($targetEntities as $e) {
             $joint = $e->get($jointProperty);
             if (!$joint || !($joint instanceof EntityInterface)) {
-                $joint = new $entityClass([], ['markNew' => true, 'source' => $junctionAlias]);
+                $joint = new $entityClass([], ['markNew' => true, 'source' => $junctionRegistryAlias]);
             }
             $sourceKeys = array_combine($foreignKey, $sourceEntity->extract($bindingKey));
             $targetKeys = array_combine($assocForeignKey, $e->extract($targetPrimaryKey));

+ 2 - 5
src/View/Widget/MultiCheckboxWidget.php

@@ -194,7 +194,8 @@ class MultiCheckboxWidget implements WidgetInterface
         if ($checkbox['label'] === false && strpos($this->_templates->get('checkboxWrapper'), '{{input}}') === false) {
             $label = $input;
         } else {
-            $labelAttrs = [
+            $labelAttrs = is_array($checkbox['label']) ? $checkbox['label'] : [];
+            $labelAttrs += [
                 'for' => $checkbox['id'],
                 'escape' => $checkbox['escape'],
                 'text' => $checkbox['text'],
@@ -202,10 +203,6 @@ class MultiCheckboxWidget implements WidgetInterface
                 'input' => $input
             ];
 
-            if (is_array($checkbox['label'])) {
-                $labelAttrs += $checkbox['label'];
-            }
-
             if ($checkbox['checked']) {
                 $labelAttrs = $this->_templates->addClass($labelAttrs, 'selected');
             }

+ 22 - 22
tests/TestCase/Cache/CacheTest.php

@@ -63,7 +63,7 @@ class CacheTest extends TestCase
     {
         Cache::setConfig('tests', [
             'engine' => 'File',
-            'path' => TMP,
+            'path' => CACHE,
             'prefix' => 'test_'
         ]);
     }
@@ -75,7 +75,7 @@ class CacheTest extends TestCase
      */
     public function testCacheEngineFallback()
     {
-        $filename = tempnam(TMP, 'tmp_');
+        $filename = tempnam(CACHE, 'tmp_');
 
         Cache::setConfig('tests', [
             'engine' => 'File',
@@ -85,13 +85,13 @@ class CacheTest extends TestCase
         ]);
         Cache::setConfig('tests_fallback', [
             'engine' => 'File',
-            'path' => TMP,
+            'path' => CACHE,
             'prefix' => 'test_',
         ]);
 
         $engine = Cache::engine('tests');
         $path = $engine->getConfig('path');
-        $this->assertSame(TMP, $path);
+        $this->assertSame(CACHE, $path);
 
         Cache::drop('tests');
         Cache::drop('tests_fallback');
@@ -107,7 +107,7 @@ class CacheTest extends TestCase
     {
         $this->expectException(Error::class);
 
-        $filename = tempnam(TMP, 'tmp_');
+        $filename = tempnam(CACHE, 'tmp_');
 
         Cache::setConfig('tests', [
             'engine' => 'File',
@@ -126,7 +126,7 @@ class CacheTest extends TestCase
      */
     public function testCacheEngineFallbackToSelf()
     {
-        $filename = tempnam(TMP, 'tmp_');
+        $filename = tempnam(CACHE, 'tmp_');
 
         Cache::setConfig('tests', [
             'engine' => 'File',
@@ -156,7 +156,7 @@ class CacheTest extends TestCase
      */
     public function testCacheFallbackWithGroups()
     {
-        $filename = tempnam(TMP, 'tmp_');
+        $filename = tempnam(CACHE, 'tmp_');
 
         Cache::setConfig('tests', [
             'engine' => 'File',
@@ -167,7 +167,7 @@ class CacheTest extends TestCase
         ]);
         Cache::setConfig('tests_fallback', [
             'engine' => 'File',
-            'path' => TMP,
+            'path' => CACHE,
             'prefix' => 'test_',
             'groups' => ['group3', 'group1'],
         ]);
@@ -190,7 +190,7 @@ class CacheTest extends TestCase
      */
     public function testCacheFallbackIntegration()
     {
-        $filename = tempnam(TMP, 'tmp_');
+        $filename = tempnam(CACHE, 'tmp_');
 
         Cache::setConfig('tests', [
             'engine' => 'File',
@@ -206,7 +206,7 @@ class CacheTest extends TestCase
         ]);
         Cache::setConfig('tests_fallback_final', [
             'engine' => 'File',
-            'path' => TMP . 'cake_test' . DS,
+            'path' => CACHE . 'cake_test' . DS,
             'groups' => ['integration_group_3'],
         ]);
 
@@ -302,12 +302,12 @@ class CacheTest extends TestCase
         static::setAppNamespace();
         $this->loadPlugins(['TestPlugin']);
 
-        $config = ['engine' => 'TestAppCache', 'path' => TMP, 'prefix' => 'cake_test_'];
+        $config = ['engine' => 'TestAppCache', 'path' => CACHE, 'prefix' => 'cake_test_'];
         Cache::setConfig('libEngine', $config);
         $engine = Cache::engine('libEngine');
         $this->assertInstanceOf('TestApp\Cache\Engine\TestAppCacheEngine', $engine);
 
-        $config = ['engine' => 'TestPlugin.TestPluginCache', 'path' => TMP, 'prefix' => 'cake_test_'];
+        $config = ['engine' => 'TestPlugin.TestPluginCache', 'path' => CACHE, 'prefix' => 'cake_test_'];
         $result = Cache::setConfig('pluginLibEngine', $config);
         $engine = Cache::engine('pluginLibEngine');
         $this->assertInstanceOf('TestPlugin\Cache\Engine\TestPluginCacheEngine', $engine);
@@ -361,12 +361,12 @@ class CacheTest extends TestCase
         return [
             'Array of data using engine key.' => [[
                 'engine' => 'File',
-                'path' => TMP . 'tests',
+                'path' => CACHE . 'tests',
                 'prefix' => 'cake_test_'
             ]],
             'Array of data using classname key.' => [[
                 'className' => 'File',
-                'path' => TMP . 'tests',
+                'path' => CACHE . 'tests',
                 'prefix' => 'cake_test_'
             ]],
             'Direct instance' => [new FileEngine()],
@@ -427,7 +427,7 @@ class CacheTest extends TestCase
     public function testConfigErrorOnReconfigure()
     {
         $this->expectException(\BadMethodCallException::class);
-        Cache::setConfig('tests', ['engine' => 'File', 'path' => TMP]);
+        Cache::setConfig('tests', ['engine' => 'File', 'path' => CACHE]);
         Cache::setConfig('tests', ['engine' => 'Apc']);
     }
 
@@ -442,7 +442,7 @@ class CacheTest extends TestCase
         $this->deprecated(function () {
             $config = [
                 'engine' => 'File',
-                'path' => TMP,
+                'path' => CACHE,
                 'prefix' => 'cake_'
             ];
             Cache::config('tests', $config);
@@ -462,7 +462,7 @@ class CacheTest extends TestCase
     {
         $config = [
             'engine' => 'File',
-            'path' => TMP,
+            'path' => CACHE,
             'prefix' => 'cake_'
         ];
         Cache::setConfig('tests', $config);
@@ -481,7 +481,7 @@ class CacheTest extends TestCase
     {
         Cache::setConfig('cache.dotted', [
             'className' => 'File',
-            'path' => TMP,
+            'path' => CACHE,
             'prefix' => 'cache_value_'
         ]);
 
@@ -733,7 +733,7 @@ class CacheTest extends TestCase
         Cache::enable();
         Cache::setConfig('test_cache_disable_1', [
             'engine' => 'File',
-            'path' => TMP . 'tests'
+            'path' => CACHE . 'tests'
         ]);
 
         $this->assertTrue(Cache::write('key_1', 'hello', 'test_cache_disable_1'));
@@ -753,7 +753,7 @@ class CacheTest extends TestCase
         Cache::disable();
         Cache::setConfig('test_cache_disable_2', [
             'engine' => 'File',
-            'path' => TMP . 'tests'
+            'path' => CACHE . 'tests'
         ]);
 
         $this->assertTrue(Cache::write('key_4', 'hello', 'test_cache_disable_2'));
@@ -781,11 +781,11 @@ class CacheTest extends TestCase
     {
         Cache::setConfig('configTest', [
             'engine' => 'File',
-            'path' => TMP . 'tests'
+            'path' => CACHE . 'tests'
         ]);
         Cache::setConfig('anotherConfigTest', [
             'engine' => 'File',
-            'path' => TMP . 'tests'
+            'path' => CACHE . 'tests'
         ]);
 
         Cache::write('key_1', 'hello', 'configTest');

+ 22 - 16
tests/TestCase/Controller/Component/RequestHandlerComponentTest.php

@@ -20,6 +20,7 @@ use Cake\Event\Event;
 use Cake\Http\Response;
 use Cake\Http\ServerRequest;
 use Cake\Routing\DispatcherFactory;
+use Cake\Routing\RouteBuilder;
 use Cake\Routing\Router;
 use Cake\TestSuite\TestCase;
 use Cake\View\AjaxView;
@@ -35,15 +36,11 @@ class RequestHandlerComponentTest extends TestCase
 {
 
     /**
-     * Controller property
-     *
      * @var RequestHandlerTestController
      */
     public $Controller;
 
     /**
-     * RequestHandler property
-     *
      * @var RequestHandlerComponent
      */
     public $RequestHandler;
@@ -90,7 +87,7 @@ class RequestHandlerComponentTest extends TestCase
         $this->RequestHandler = $this->Controller->components()->load('RequestHandler');
         $this->request = $request;
 
-        Router::scope('/', function ($routes) {
+        Router::scope('/', function (RouteBuilder $routes) {
             $routes->setExtensions('json');
             $routes->fallbacks('InflectedRoute');
         });
@@ -383,7 +380,6 @@ class RequestHandlerComponentTest extends TestCase
     {
         $this->deprecated(function () {
             $this->RequestHandler->setConfig(['viewClassMap' => ['json' => 'CustomJson']]);
-            $this->RequestHandler->initialize([]);
             $result = $this->RequestHandler->viewClassMap();
             $expected = [
                 'json' => 'CustomJson',
@@ -416,7 +412,6 @@ class RequestHandlerComponentTest extends TestCase
     {
         $this->Controller->request = $this->request->withHeader('X-Requested-With', 'XMLHttpRequest');
         $event = new Event('Controller.startup', $this->Controller);
-        $this->RequestHandler->initialize([]);
         $this->Controller->beforeFilter($event);
         $this->RequestHandler->startup($event);
         $this->assertTrue($this->Controller->request->getParam('isAjax'));
@@ -432,7 +427,6 @@ class RequestHandlerComponentTest extends TestCase
     {
         $event = new Event('Controller.startup', $this->Controller);
         $this->Controller->request = $this->request->withHeader('X-Requested-With', 'XMLHttpRequest');
-        $this->RequestHandler->initialize([]);
         $this->RequestHandler->startup($event);
         $event = new Event('Controller.beforeRender', $this->Controller);
         $this->RequestHandler->beforeRender($event);
@@ -443,7 +437,6 @@ class RequestHandlerComponentTest extends TestCase
 
         $this->_init();
         $this->Controller->request = $this->Controller->request->withParam('_ext', 'js');
-        $this->RequestHandler->initialize([]);
         $this->RequestHandler->startup($event);
         $this->assertNotEquals(AjaxView::class, $this->Controller->viewBuilder()->getClassName());
     }
@@ -459,7 +452,6 @@ class RequestHandlerComponentTest extends TestCase
         Router::extensions(['json', 'xml', 'ajax'], false);
         $this->Controller->request = $this->Controller->request->withParam('_ext', 'json');
         $event = new Event('Controller.startup', $this->Controller);
-        $this->RequestHandler->initialize([]);
         $this->RequestHandler->startup($event);
         $event = new Event('Controller.beforeRender', $this->Controller);
         $this->RequestHandler->beforeRender($event);
@@ -480,7 +472,6 @@ class RequestHandlerComponentTest extends TestCase
         Router::extensions(['json', 'xml', 'ajax'], false);
         $this->Controller->request = $this->Controller->request->withParam('_ext', 'xml');
         $event = new Event('Controller.startup', $this->Controller);
-        $this->RequestHandler->initialize([]);
         $this->RequestHandler->startup($event);
         $event = new Event('Controller.beforeRender', $this->Controller);
         $this->RequestHandler->beforeRender($event);
@@ -501,7 +492,6 @@ class RequestHandlerComponentTest extends TestCase
         Router::extensions(['json', 'xml', 'ajax'], false);
         $this->Controller->request = $this->Controller->request->withParam('_ext', 'ajax');
         $event = new Event('Controller.startup', $this->Controller);
-        $this->RequestHandler->initialize([]);
         $this->RequestHandler->startup($event);
         $event = new Event('Controller.beforeRender', $this->Controller);
         $this->RequestHandler->beforeRender($event);
@@ -521,7 +511,6 @@ class RequestHandlerComponentTest extends TestCase
         Router::extensions(['json', 'xml', 'ajax', 'csv'], false);
         $this->Controller->request = $this->Controller->request->withParam('_ext', 'csv');
         $event = new Event('Controller.startup', $this->Controller);
-        $this->RequestHandler->initialize([]);
         $this->RequestHandler->startup($event);
         $this->Controller->getEventManager()->on('Controller.beforeRender', function () {
             return $this->Controller->response;
@@ -532,6 +521,26 @@ class RequestHandlerComponentTest extends TestCase
     }
 
     /**
+     * Tests that configured extensions that have no configured mimetype do not silently fallback to HTML.
+     *
+     * @return void
+     * @expectedException \Cake\Http\Exception\NotFoundException
+     * @expectedExceptionMessage Invoked extension not recognized/configured: foo
+     */
+    public function testUnrecognizedExtensionFailure()
+    {
+        Router::extensions(['json', 'foo'], false);
+        $this->Controller->setRequest($this->Controller->getRequest()->withParam('_ext', 'foo'));
+        $event = new Event('Controller.startup', $this->Controller);
+        $this->RequestHandler->startup($event);
+        $this->Controller->getEventManager()->on('Controller.beforeRender', function () {
+            return $this->Controller->getResponse();
+        });
+        $this->Controller->render();
+        $this->assertEquals('RequestHandlerTest' . DS . 'csv', $this->Controller->viewBuilder()->getTemplatePath());
+    }
+
+    /**
      * testStartupCallback method
      *
      * @return void
@@ -799,7 +808,6 @@ XML;
         $this->Controller->request = $this->Controller->request->withHeader('X-Requested-With', 'XMLHttpRequest');
 
         $event = new Event('Controller.startup', $this->Controller);
-        $this->RequestHandler->initialize([]);
         $this->RequestHandler->setConfig('enableBeforeRedirect', false);
         $this->RequestHandler->startup($event);
         $this->assertNull($this->RequestHandler->beforeRedirect($event, '/posts/index', $this->Controller->response));
@@ -816,7 +824,6 @@ XML;
     {
         $this->deprecated(function () {
             $event = new Event('Controller.startup', $this->Controller);
-            $this->RequestHandler->initialize([]);
             $this->RequestHandler->startup($event);
             $this->assertNull($this->RequestHandler->beforeRedirect($event, '/', $this->Controller->response));
         });
@@ -839,7 +846,6 @@ XML;
             $this->Controller->response->expects($this->never())
                 ->method('body');
 
-            $this->RequestHandler->initialize([]);
             $this->RequestHandler->startup($event);
             $this->assertNull($this->RequestHandler->beforeRedirect($event, null, $this->Controller->response));
         });

+ 24 - 0
tests/TestCase/Http/ResponseTest.php

@@ -268,6 +268,30 @@ class ResponseTest extends TestCase
     }
 
     /**
+     * @return void
+     */
+    public function testSetTypeMap()
+    {
+        $response = new Response();
+        $response->setTypeMap('ical', 'text/calendar');
+
+        $response = $response->withType('ical')->getType();
+        $this->assertEquals('text/calendar', $response);
+    }
+
+    /**
+     * @return void
+     */
+    public function testSetTypeMapAsArray()
+    {
+        $response = new Response();
+        $response->setTypeMap('ical', ['text/calendar']);
+
+        $response = $response->withType('ical')->getType();
+        $this->assertEquals('text/calendar', $response);
+    }
+
+    /**
      * Tests the withType method
      *
      * @return void

+ 41 - 0
tests/TestCase/ORM/Association/BelongsToManyTest.php

@@ -600,6 +600,47 @@ class BelongsToManyTest extends TestCase
     }
 
     /**
+     * Tests that linking entities will set the junction table registry alias
+     *
+     * @return void
+     */
+    public function testLinkSetSourceToJunctionEntities()
+    {
+        $connection = ConnectionManager::get('test');
+        $joint = $this->getMockBuilder('\Cake\ORM\Table')
+            ->setMethods(['save', 'getPrimaryKey'])
+            ->setConstructorArgs([['alias' => 'ArticlesTags', 'connection' => $connection]])
+            ->getMock();
+        $joint->setRegistryAlias('Plugin.ArticlesTags');
+
+        $config = [
+            'sourceTable' => $this->article,
+            'targetTable' => $this->tag,
+            'through' => $joint,
+        ];
+
+        $assoc = new BelongsToMany('Tags', $config);
+        $opts = ['markNew' => false];
+        $entity = new Entity(['id' => 1], $opts);
+        $tags = [new Entity(['id' => 2], $opts)];
+
+        $joint->method('getPrimaryKey')
+            ->will($this->returnValue(['article_id', 'tag_id']));
+
+        $joint->expects($this->once())
+            ->method('save')
+            ->will($this->returnCallback(function (Entity $e, $opts) {
+                $this->assertSame('Plugin.ArticlesTags', $e->getSource());
+
+                return $e;
+            }));
+
+        $this->assertTrue($assoc->link($entity, $tags));
+        $this->assertSame($entity->tags, $tags);
+        $this->assertSame('Plugin.ArticlesTags', $entity->tags[0]->get('_joinData')->getSource());
+    }
+
+    /**
      * Test liking entities having a non persisted source entity
      *
      * @return void

+ 38 - 0
tests/TestCase/View/Widget/MultiCheckboxWidgetTest.php

@@ -18,6 +18,7 @@ use Cake\TestSuite\TestCase;
 use Cake\View\StringTemplate;
 use Cake\View\Widget\LabelWidget;
 use Cake\View\Widget\MultiCheckboxWidget;
+use Cake\View\Widget\NestingLabelWidget;
 
 /**
  * MultiCheckbox test case.
@@ -36,6 +37,7 @@ class MultiCheckboxWidgetTest extends TestCase
         $templates = [
             'checkbox' => '<input type="checkbox" name="{{name}}" value="{{value}}"{{attrs}}>',
             'label' => '<label{{attrs}}>{{text}}</label>',
+            'nestingLabel' => '<label{{attrs}}>{{input}}{{text}}</label>',
             'checkboxWrapper' => '<div class="checkbox">{{input}}{{label}}</div>',
             'multicheckboxWrapper' => '<fieldset{{attrs}}>{{content}}</fieldset>',
             'multicheckboxTitle' => '<legend>{{text}}</legend>',
@@ -441,6 +443,42 @@ class MultiCheckboxWidgetTest extends TestCase
     }
 
     /**
+     * Test rendering without input nesting inspite of using NestingLabelWidget
+     *
+     * @return void
+     */
+    public function testRenderNestingLabelWidgetWithoutInputNesting()
+    {
+        $label = new NestingLabelWidget($this->templates);
+        $input = new MultiCheckboxWidget($this->templates, $label);
+        $data = [
+            'name' => 'tags',
+            'label' => [
+                'input' => false,
+            ],
+            'options' => [
+                1 => 'CakePHP',
+            ],
+        ];
+        $result = $input->render($data, $this->context);
+
+        $expected = [
+            ['div' => ['class' => 'checkbox']],
+            ['input' => [
+                'type' => 'checkbox',
+                'name' => 'tags[]',
+                'value' => 1,
+                'id' => 'tags-1',
+            ]],
+            ['label' => ['for' => 'tags-1']],
+            'CakePHP',
+            '/label',
+            '/div',
+        ];
+        $this->assertHtml($expected, $result);
+    }
+
+    /**
      * Test render with groupings.
      *
      * @return void

+ 0 - 0
tests/test_app/Plugin/TestPlugin/src/Template/Bake/empty


+ 0 - 0
tests/test_app/Plugin/TestPluginTwo/src/Template/Bake/empty


+ 0 - 2
tests/test_app/TestApp/Template/Bake/classes/test_object.ctp

@@ -1,2 +0,0 @@
-I got rendered
-<%= $test; %>

+ 0 - 13
tests/test_app/TestApp/Template/Bake/view_tests/leading_whitespace.ctp

@@ -1,13 +0,0 @@
-<% foreach([1,2,3] as $number): %>
-    <%= $number %>
-<% endforeach; %>
-
-<% foreach([1,2,3] as $number): %>
-    number
-<% endforeach; %>
-
-This should make no difference:
-            <%- foreach([1,2,3] as $number): %>
-    <%= $number %>
-            <%- endforeach; %>
-And the previous line should not have leading whitespace.

+ 0 - 4
tests/test_app/TestApp/Template/Bake/view_tests/newlines.ctp

@@ -1,4 +0,0 @@
-There should be a newline about here: <%= "" %>
-And this should be on the next line.
-
-There should be no new line after this<%= "" %>

+ 0 - 1
tests/test_app/TestApp/Template/Bake/view_tests/simple.ctp

@@ -1 +0,0 @@
-The value of aVariable is: <%= $aVariable %>.

+ 0 - 1
tests/test_app/TestApp/Template/Bake/view_tests/simple_php.ctp

@@ -1 +0,0 @@
-The value of aVariable is: <%= $aVariable %>. Not <?php echo $aVariable ?>.

+ 0 - 1
tests/test_app/TestApp/Template/Bake/view_tests/simple_php_short_tags.ctp

@@ -1 +0,0 @@
-The value of aVariable is: <%= $aVariable %>. Not <?= $aVariable ?>.

+ 0 - 13
tests/test_app/TestApp/Template/Bake/view_tests_compare/leading_whitespace.ctp

@@ -1,13 +0,0 @@
-    1
-    2
-    3
-
-    number
-    number
-    number
-
-This should make no difference:
-    1
-    2
-    3
-And the previous line should not have leading whitespace.

+ 0 - 1
tests/test_app/TestApp/Template/Bake/views/admin_edit.ctp

@@ -1 +0,0 @@
-admin_edit template

+ 0 - 0
tests/test_app/TestApp/Template/Bake/views/admin_form.ctp