PHP Yii Framework Online Test

Instructions:

  • This practice test has 20 questions
  • You have to attempt all the questions
  • Time will be 05:00 minute for 20 questions. After 05:00 minute, practice test will be submitted automatically and you will redirect to result page.
  • This practice test is for self evalutation, if you get less marks then passing marks. Please prepare more for get excellent mark next time
  • Best of luck :)
Time: 05:00 minutes Passing Marks: 60%

1. Which Yii caching method is recommended for caching a single API response with a specific key?

2. What is the purpose of the "yii\web\UrlRule" class in Yii's RESTful routing?

3. What Yii configuration parameter specifies the charset used for database communication?

4. What Yii method is used to create a new record in the database using Active Record?

5. What does the HTTP status code "404" indicate in a RESTful API response?

6. In Yii, which component is responsible for handling pagination of data in RESTful APIs?

7. What is Yii's recommended way to include a JavaScript file from an external source in a Yii view?

8. In Yii asset bundles, which method should be used to specify the dependencies of an asset bundle?

9. What is the primary purpose of an event handler in Yii middleware?

10. Yii follows which design pattern for building web applications?

11. Which Yii component is responsible for rendering view files and displaying content to the user?

12. In Yii 2, which configuration file is used to set up application-wide parameters and components?

13. In RESTful form handling, what is the purpose of the "CSRF token"?

14. What is the purpose of the yiic command in Yii 1.x for code generation and console tasks?

15. What is the purpose of creating a production environment configuration in Yii?

16. What is the purpose of authentication in a RESTful Yii application?

17. In Yii's Active Record, what method is commonly used to delete a record from the database?

18. What is the primary benefit of running automated tests in RESTful Yii applications?

19. In Yii, what is the purpose of the CErrorHandler component?

20. What is the HTTP status code typically used for indicating a "Not Found" error in a RESTful API response?