소스 검색

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

adds test 6 plaintext for CakePHP
michaelhixson 12 년 전
부모
커밋
348173da9f
1개의 변경된 파일24개의 추가작업 그리고 0개의 파일을 삭제
  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');
+
+		 */
+	}
+}