tailieunhanh - Học php, mysql và javascript - p 51

Sử dụng PEAR, bạn có thể tiết kiệm cho mình một số lượng đáng kể của công việc, nhưng nếu bạn vẫn không thích sử dụng nó, ít nhất bạn sẽ nhận gói PEAR khi bạn nhìn thấy chúng được sử dụng trong các chương trình khác và sẽ biết cách làm việc với họ. | Using PEAR you can save yourself a considerable amount of work but if you still prefer not to use it at least you will now recognize PEAR packages when you see them used in other programs and will know how to work with them. Adding Other PEAR Packages With PEAR properly installed on your system you are able to install additional packages from the command line by using one of the commands in Table E-2 where package is the name of a PEAR package as listed at the web page http . Table E-2. Installing PEAR packages on different systems System Command Windows C Program Files EasyPHP php pear install package Mac OS X Applications MAMP bin pear install package Linux Unix pear install package To determine which packages are installed replace install package in Table E-2 with the word list and the output should be similar to the following INSTALLED PACKAGES CHANNEL PACKAGE VERSION STATE Archive_Tar stable Console_Getopt stable MDB2 stable MDB2_Driver_mysql stable PEAR stable Structures_Graph stable Unit Testing with PHPUnit Now that you are familiar with object-oriented programming it s a good idea to get a taste of unit testing. This is a method of code testing that verifies whether individual units of source code are working correctly. Unit testing provides the following benefits It allows for automation of the testing process. It reduces the difficulty of discovering errors within more complex code. Testing is often enhanced because attention is given to each unit. Install PHPUnit with the PEAR installer. To do this go to a Command or Terminal prompt ensure that you have Administrator or Superuser privileges and issue the two Unit Testing with PHPUnit 481 lines of code in Table E-3 according to your operating system. On Windows systems ignore and close any pop-up Invalid configuration directive alerts that may appear. Table E-3. Commands for Installing PHPUnit on different systems System XP .