diff --git a/lib/Cake/Test/Case/Console/Command/Task/ViewTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/ViewTaskTest.php index 6b02d12ba..086a2b8b8 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/ViewTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/ViewTaskTest.php @@ -323,12 +323,14 @@ class ViewTaskTest extends CakeTestCase { public function testBakeIndex() { $this->Task->controllerName = 'ViewTaskComments'; + $expected = file_get_contents(CAKE . 'Test' . DS . 'bake_compare' . DS . 'View' . DS . 'index.ctp'); $this->Task->expects($this->at(0))->method('createFile') ->with( TMP . 'ViewTaskComments' . DS . 'index.ctp', - $this->stringContains("\$viewTaskComment['Article']['title']") + $expected ); $this->Task->bake('index', true); + } /** diff --git a/lib/Cake/Test/bake_compare/View/index.ctp b/lib/Cake/Test/bake_compare/View/index.ctp new file mode 100644 index 000000000..d7bb68982 --- /dev/null +++ b/lib/Cake/Test/bake_compare/View/index.ctp @@ -0,0 +1,58 @@ +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Paginator->sort('id'); ?>Paginator->sort('article_id'); ?>Paginator->sort('user_id'); ?>Paginator->sort('comment'); ?>Paginator->sort('published'); ?>Paginator->sort('created'); ?>Paginator->sort('updated'); ?>
  + Html->link($viewTaskComment['Article']['title'], array('controller' => 'view_task_articles', 'action' => 'view', $viewTaskComment['Article']['id'])); ?> +       + Html->link(__('View'), array('action' => 'view', $viewTaskComment['ViewTaskComment']['id'])); ?> + Html->link(__('Edit'), array('action' => 'edit', $viewTaskComment['ViewTaskComment']['id'])); ?> + Form->postLink(__('Delete'), array('action' => 'delete', $viewTaskComment['ViewTaskComment']['id']), array('confirm' => __('Are you sure you want to delete # %s?', $viewTaskComment['ViewTaskComment']['id']))); ?> +
+

+ Paginator->counter(array( + 'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}') + )); + ?>

+
+ Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled')); + echo $this->Paginator->numbers(array('separator' => '')); + echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled')); + ?> +
+
+
+

+ +