Cake PHP Set 4
Free Online Best Cake PHP MCQ Questions for improve your basic knowledge of Cake PHP. This Cake PHP Set 4 test that contains 25 Multiple Choice Questions with 4 options. You have to select the right answer to a question.
Start
Congratulations - you have completed Cake PHP Set 4.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1 |
Actions are methods on a ________ that handle requests.
A | controller |
B | components |
C | models |
D | views |
Question 2 |
The single instruction in the action uses _______to pass data from the controller to view.
A | set() |
B | show() |
C | view() |
D | get() |
Question 3 |
Which TextHelper method allows you to transform links inside any text to valid HTML link tags?
A | processLinks() |
B | automaticUrls() |
C | autoLink() |
D | addLinks() |
Question 4 |
How to create a form in cakephp?
A | $this->create() |
B | $this->FormHelper->create() |
C | $this->FormController->create() |
D | $this->Form->create() |
Question 5 |
The set method() is the main way to send data from your controller to your_________.
A | controller |
B | model |
C | action |
D | view |
Question 6 |
A_____is a class that aids in controller logic.
A | behavier |
B | helper |
C | Component |
D | model |
Question 7 |
By naming your model post ,cakephp will automatically infer that this model work with
A | controller name |
B | PostController |
C | post_controller |
D | postcontroller |
Question 8 |
_____ensures that the model is loaded when it is needed.
A | Uses('AppModel','Model'); |
B | App::uses('AppModel",Modelname'); |
C | App::uses('AppModel','Model'); |
D | ('AppModel",Model'); |
Question 9 |
The security Component create an easy way to integrate tighter security in our application.Its provides methods for various tasks like.
A | Restriction which HTTP Methods |
B | Requiring that SSl be used |
C | Limiting cross controller communication |
D | All of them |
Question 10 |
Which of the following is not a built-in validation rule name?
A | custom |
B | datetime |
C | between |
D | alphanumeric |
Question 11 |
The _____seed is used for encrypt /decrypt strings.
A | salt |
B | cipher |
C | rsa |
D | hash |
Question 12 |
Controller classnames are ______, CamelCased, and end in Controller.
A | singular |
B | plural |
C | both |
D | none |
Question 13 |
Which testing method allows you to test HTML generation easily?
A | assertHTML() |
B | assertTags() |
C | assertCode() |
D | assertOutput() |
Question 14 |
We use the SessionComponent's SessionComponent________method to set a massage to a session variable to be displayed on the page after redirection.
A | setFlash() |
B | setMessage() |
C | showMessage() |
D | showFlash() |
Question 15 |
Which one is NOT a valid behavior callback?
A | beforeDelete() |
B | beforeSave() |
C | beforeInitialize() |
D | beforeValidate() |
Question 16 |
Controller extensions in CakePHP is called
A | Behaviors |
B | Components |
C | Helpers |
D | all |
Question 17 |
The set method() is the main way to send data from your controller to your_________.
A | controller |
B | view |
C | model |
D | action |
Question 18 |
What’s the name of the variable that holds a model validation rules?
A | $validate |
B | $rules |
C | $validationRules |
D | $validation |
Question 19 |
On which layer could you implement your own paginateCount() method?
A | Helper |
B | Behavior |
C | DataSource |
D | Controller |
Question 20 |
The __________class is the parent class to all of your application's controllers.
A | ViewController |
B | DevController |
C | Appcontroller |
D | Controller |
Question 21 |
CakePHP's model class files located in
A | /app/config/model |
B | /app/system/Model |
C | /app/Model |
D | /app/Models/Model |
Question 22 |
In which controller callback would you preferably set “Auth->loginAction”?
A | loginFilter() |
B | beforeFilter() |
C | beforeRender() |
D | all |
Question 23 |
_________often represent a single function or interface in an application.
A | View |
B | Controller |
C | Model |
D | Actions |
Question 24 |
When unit testing controller actions with ControllerTestCase, which of the following is NOT a built-in return type:
A | vars – Get the set view variables |
B | contents – Get the rendered view, including layout |
C | params – Get the values of all method parameters passed |
D | view – Get the rendered view, without a layout |
Question 25 |
Which model method requires values to be manually escaped?
A | Model::read() |
B | Model::saveAssociated() |
C | Model::saveField() |
D | Model::query() |
Once you are finished, click the button below. Any items you have not completed will be marked incorrect.
Get Results
There are 25 questions to complete.
← |
List |
→ |
Return
Shaded items are complete.
1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 |
End |
Return
You have completed
questions
question
Your score is
Correct
Wrong
Partial-Credit
You have not finished your quiz. If you leave this page, your progress will be lost.
Correct Answer
You Selected
Not Attempted
Final Score on Quiz
Attempted Questions Correct
Attempted Questions Wrong
Questions Not Attempted
Total Questions on Quiz
Question Details
Results
Date
Score
Hint
Time allowed
minutes
seconds
Time used
Answer Choice(s) Selected
Question Text
All done
Need more practice!
Keep trying!
Not bad!
Good work!
Perfect!