Entradas de la Categoría ‘php’
Some useful PHPUnit methods to make testing easier
En: php
27 may 2013<?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 [...]
- Sin comentarios
- Tags: phpunit
Customize ResultPrinter in PHPUnit
En: php
1 abr 2013There 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. < [...]
- Sin comentarios
- Tags: phpunit
PHP: close connection and continue the execution
En: php
23 mar 2013In 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 [...]
Serverstats: sistema de monitorizar servidores en PHP
En: php
21 oct 2012Hací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.
- (1) Comentario
- Tags: server, Serverstats, servidor web
Configurar CentOS 6.2 para desarrollo web
En: php
25 abr 2012Despué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:
- (3) Comentarios
- Tags: apache, git, mysql, php
XDebug: funciones indispensables
En: php
1 sep 2011XDebug 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.
- Sin comentarios
- Tags: debug, php, xdebug
PHPUnit Cheat Sheet
En: php
4 jun 2011Despué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, …
- (6) Comentarios
- Tags: cheat sheet, Mock, php, phpunit
Desarrollo de PHP avanzado
En: php
23 may 2011Charla 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.
- (2) Comentarios
- Tags: ide, php, video
