background preloader

Yii Information

Facebook Twitter

Yii-debug-toolbar. A configurable set of panels that display various debug information about the current request/response.


The Yii Debug Toolbar is a configurable set of panels that display various debug information about the current request/response and when clicked, display more details about the panel's content. It is a ported to PHP famous Django Debug Toolbar. Currently, the following panels have been written and are working: Request timerA list of superglobalsApplication settingsSQL queries including time to execute and param bindingsLogging output via Yii built-in logging Requirements ¶ JavaScript enabled browser Yii 1.1.4 + Installation ¶ How to re enable logging during unit testing. Introduction ¶ Some of you have experienced the need to log some information while doing unit testing, due to the fact that the information given in the summary is just not enough, to know why the test is actually failing. this article focuses on 2 ways to get you logs up and running again.

How to re enable logging during unit testing

Bootstrap file ¶ The basic bootstrap.php file looks like this. <? Php $yiit=dirname(__FILE__) In order to enable trace logging, you need to tell the application that it will run in debug mode. so you need to add the following 2 lines (borrowed from index.php) Unit Testing. Because the Yii testing framework is built on top of PHPUnit, it is recommended that you go through the PHPUnit documentation first to get the basic understanding on how to write a unit test.

Unit Testing

Functional Testing. Before reading this section, it is recommended that you read the Selenium documentation and the PHPUnit documentation first.

Functional Testing

We summarize in the following the basic principles of writing a functional test in Yii: Like unit test, a functional test is written in terms of a class XyzTest which extends from CWebTestCase, where Xyz stands for the class being tested. Because PHPUnit_Extensions_SeleniumTestCase is the ancestor class for CWebTestCase, we can use all methods inherited from this class.The functional test class is saved in a PHP file named as XyzTest.php.

By convention, the functional test file may be stored under the directory protected/tests/functional.The test class mainly contains a set of test methods named as testAbc, where Abc is often the name of a feature to be tested. Before we describe how to write a functional test, let's take a look at the WebTestCase.php file generated by the yiic webapp command. Testing: Overview. Testing is an indispensable process of software development.

Testing: Overview

Whether we are aware of it or not, we conduct testing all the time when we are developing a Web application. Responsive Design Testing. Open source projects built with yii. Unit Testing. YiiBooster - Started Site. Yii for beginners. Intro (Part 1) ¶ Hi.

Yii for beginners

Create facebook application using php - Yii Framework and Graph API. Recently we developed an facebook application and during the development of application, we encounter lots of issues due to vague Facebook documentation.

Create facebook application using php - Yii Framework and Graph API

We wanted to share our experience so that other developers can develop facebook application easily. We have used yii framework for this application as its pretty cool framework and application development on this framework takes less time without compromising the performance.In this article, we assume that the reader have experience in facebook application development. A little introduction about yii framework Yii is a high-performance PHP framework best for developing Web 2.0 applications. Yii comes with rich features: MVC, DAO/ActiveRecord, I18N/L10N, caching, authentication and role-based access control, scaffolding, testing, etc.

A little introduction about facebook Graph API Facebook introduced new components of Facebook Platform and one of them is Graph API. Yii – PHP Coding Standards (draft) Yiimailer. Yii extension for sending HTML emails with layouts using PHPMailer What's new ¶ v1.5 ¶ Calling render() is not necessary when sending emailsNew methods : setFrom(), setTo(), setSubject(), setBody(), setAttachment()...testMode for saving emails as eml filesNew ways to send simple messages without layout or view, or with just layout without the viewUpdated PHPMailer to 5.2.6 Extension should be compatible with code used with previous versions Features ¶ Based on latest PHPMailer (version 5.2.6 bundled)Supports Yii layouts and translationSupports web and console applicationsSend full HTML emails with embeded imagesWork with views like you usually do in YiiUse test mode to save emails instead of sending them (useful when you don't have mail server installed locally) Installation ¶ Instantiate YiiMailer in your controller or console command and pass view and data array: $mail = new YiiMailer('contact', array('message' => 'Message to send', 'name' => 'John Doe', 'description' => 'Contact form'));


Sending email in yiiframework using yii-mail extensions. Sending email in a website is one of the main function to have interaction with the users and one of main features of the website.

Sending email in yiiframework using yii-mail extensions

For yii users maybe ever had error when sending the emails in the localhost with some kinds of warning. The error maybe like this : It has caused because in the localhost there is no mail server so you can even send email. To solve this issue you must install mail server in your local computer such as hMailServer. Or if you want to use the mail server from your provider you can use the SMTP configuration email from the provider.