Mark Story 11 年 前
コミット
c644474f99

+ 4 - 0
tests/TestCase/View/CellTest.php

@@ -75,6 +75,10 @@ class CellTest extends TestCase
         $this->assertContains('<h2>Usectetur adipiscing eli</h2>', $render);
         $this->assertContains('<h2>Topis semper blandit eu non</h2>', $render);
         $this->assertContains('<h2>Suspendisse gravida neque</h2>', $render);
+
+        $cell = $this->View->cell('Cello');
+        $this->assertInstanceOf('TestApp\View\Cell\CelloCell', $cell);
+        $this->assertEquals("Cellos\n", $cell->render());
     }
 
     /**

+ 1 - 0
tests/test_app/TestApp/Template/Cell/Cello/display.ctp

@@ -0,0 +1 @@
+Cellos

+ 26 - 0
tests/test_app/TestApp/View/Cell/CelloCell.php

@@ -0,0 +1,26 @@
+<?php
+/**
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link          http://cakephp.org CakePHP(tm) Project
+ * @since         3.0.0
+ * @license       http://www.opensource.org/licenses/mit-license.php MIT License
+ */
+namespace TestApp\View\Cell;
+
+use Cake\View\Cell;
+
+/**
+ * Class naming test stub.
+ */
+class CelloCell extends Cell
+{
+    public function display()
+    {
+    }
+}