Browse Source

Merge pull request #344 from Schlaefer/freature/cakephp-test6-plaintext

adds test 6 plaintext for CakePHP
michaelhixson 12 years ago
parent
commit
348173da9f
1 changed files with 24 additions and 0 deletions
  1. 24 0
      cake/app/Controller/PlaintextController.php

+ 24 - 0
cake/app/Controller/PlaintextController.php

@@ -0,0 +1,24 @@
+<?php
+
+App::uses('AppController', 'Controller');
+
+class PlaintextController extends AppController {
+
+	public function index() {
+		$this->autoRender = false;
+		header("Content-type: text/plain");
+		echo 'Hello, World!';
+
+		/*
+		 * Because this test is focused on routing we don't involve the view.
+		 *
+		 * Normally we would create a template file index.ctp containing "Hello, World!"
+		 * in app/View/Plaintext and:
+		 *
+
+		$this->autoLayout = false;
+		$this->response->type('text');
+
+		 */
+	}
+}