Entradas de la Categoría ‘php

<?php   namespace jtreminio\TestExtensions;   /** * Some useful methods to make testing with PHPUnit faster and more fun * * @author Juan Treminio <jtreminio@gmail.com> */ abstract class TestExtensions extends \PHPUnit_Framework_TestCase {   /** * Set protected/private attribute of object * * @param object &$object Object containing attribute * @param string $attributeName Attribute name to [...]

There are one class that prints the results of the tests when you execute PHPUnit with a testsuite. If you want, you can customize the way that you print it, setting the colors, the characters, the width, … You have to create a class that extends “PHPUnit_TextUI_ResultPrinter”, and set that class in your phpunit.xml. < [...]

In HTTP/1.1 definition, it exists a header called “Connection” that, if you define “close”, you are sending that the connection will be closed after completion of the response. The client will know that the response is complete if it know the response length. The next code calculates the response length, and send the two headers needed [...]

Hacía tiempo que buscaba un sistema para monitorizar servidores y por fin he encontrado algo decente: Serverstats. El código fuente lo podéis ver en GitHub.

Después de descargar y instalar la última versión de CentOS, hay que instalar y configurar una serie de paquetes. Se calcula que se han activado dos dispositivos de red: un adaptador puente, y un adaptador sólo-anfitrión. Si se quiere configurar los adaptadores de red, hay que crear unos archivos:

XDebug es una extensión para PHP, que permite depurar y perfilar una aplicación. Ofrece una serie de funciones muy útiles que reportan un conjunto de información en el momento que se desee.

PHPUnit Cheat Sheet

En: php

4 jun 2011

Después de aprender a construir pruebas unitarias, de estudiar a fondo PHPUnit y hacerme apuntes, solo me quedaba crear un Cheat Sheet de PHPUnit. Esta basado en la versión 3.6 de PHPUnit, y aparecen los diferentes métodos ”asserts” que existen, los elementos necesarios para generar los Mock Objects que se requieran, utilidades, ejemplos, …

Charla buenísima de Carlos Buenosvinos (@buenosvinos), que dio en mayo del 2011 en Castellón de la Plana. Habla de muchos aspectos que cualquier desarrollador PHP que se considere avanzado, ha de conocer. También esos aspectos deben ser utilizados en ciertos proyectos con un nivel de complejidad o tráfico elevado.


Página 1 de 41234