P H P U n i t   1 1 . 5 . 5 7   b y   S e b a s t i a n   B e r g m a n n   a n d   c o n t r i b u t o r s . 
 
 
 
 U s a g e : 
 
     p h p u n i t   [ o p t i o n s ]   < d i r e c t o r y | f i l e >   . . . 
 
 
 
 C o n f i g u r a t i o n : 
 
 
 
     - - b o o t s t r a p   < f i l e >                                       A   P H P   s c r i p t   t h a t   i s   i n c l u d e d   b e f o r e   t h e   t e s t s   r u n 
 
     - c | - - c o n f i g u r a t i o n   < f i l e >                         R e a d   c o n f i g u r a t i o n   f r o m   X M L   f i l e 
 
     - - n o - c o n f i g u r a t i o n                                       I g n o r e   d e f a u l t   c o n f i g u r a t i o n   f i l e   ( p h p u n i t . x m l ) 
 
     - - e x t e n s i o n   < c l a s s >                                     R e g i s t e r   t e s t   r u n n e r   e x t e n s i o n   w i t h   b o o t s t r a p   < c l a s s > 
 
     - - n o - e x t e n s i o n s                                             D o   n o t   r e g i s t e r   t e s t   r u n n e r   e x t e n s i o n s 
 
     - - i n c l u d e - p a t h   < p a t h ( s ) >                           P r e p e n d   P H P ' s   i n c l u d e _ p a t h   w i t h   g i v e n   p a t h ( s ) 
 
     - d   < k e y [ = v a l u e ] >                                           S e t s   a   p h p . i n i   v a l u e 
 
     - - c a c h e - d i r e c t o r y   < d i r >                             S p e c i f y   c a c h e   d i r e c t o r y 
 
     - - g e n e r a t e - c o n f i g u r a t i o n                           G e n e r a t e   c o n f i g u r a t i o n   f i l e   w i t h   s u g g e s t e d   s e t t i n g s 
 
     - - m i g r a t e - c o n f i g u r a t i o n                             M i g r a t e   c o n f i g u r a t i o n   f i l e   t o   c u r r e n t   f o r m a t 
 
     - - g e n e r a t e - b a s e l i n e   < f i l e >                       G e n e r a t e   b a s e l i n e   f o r   i s s u e s 
 
     - - u s e - b a s e l i n e   < f i l e >                                 U s e   b a s e l i n e   t o   i g n o r e   i s s u e s 
 
     - - i g n o r e - b a s e l i n e                                         D o   n o t   u s e   b a s e l i n e   t o   i g n o r e   i s s u e s 
 
 
 
 S e l e c t i o n : 
 
 
 
     - - l i s t - s u i t e s                                                 L i s t   a v a i l a b l e   t e s t   s u i t e s 
 
     - - t e s t s u i t e   < n a m e >                                       O n l y   r u n   t e s t s   f r o m   t h e   s p e c i f i e d   t e s t   s u i t e ( s ) 
 
     - - e x c l u d e - t e s t s u i t e   < n a m e >                       E x c l u d e   t e s t s   f r o m   t h e   s p e c i f i e d   t e s t   s u i t e ( s ) 
 
     - - l i s t - g r o u p s                                                 L i s t   a v a i l a b l e   t e s t   g r o u p s 
 
     - - g r o u p   < n a m e >                                               O n l y   r u n   t e s t s   f r o m   t h e   s p e c i f i e d   g r o u p ( s ) 
 
     - - e x c l u d e - g r o u p   < n a m e >                               E x c l u d e   t e s t s   f r o m   t h e   s p e c i f i e d   g r o u p ( s ) 
 
     - - c o v e r s   < n a m e >                                             O n l y   r u n   t e s t s   t h a t   i n t e n d   t o   c o v e r   < n a m e > 
 
     - - u s e s   < n a m e >                                                 O n l y   r u n   t e s t s   t h a t   i n t e n d   t o   u s e   < n a m e > 
 
     - - r e q u i r e s - p h p - e x t e n s i o n   < n a m e >             O n l y   r u n   t e s t s   t h a t   r e q u i r e   P H P   e x t e n s i o n   < n a m e > 
 
     - - l i s t - t e s t - f i l e s                                         L i s t   a v a i l a b l e   t e s t   f i l e s 
 
     - - l i s t - t e s t s                                                   L i s t   a v a i l a b l e   t e s t s 
 
     - - l i s t - t e s t s - x m l   < f i l e >                             L i s t   a v a i l a b l e   t e s t s   i n   X M L   f o r m a t 
 
     - - f i l t e r   < p a t t e r n >                                       F i l t e r   w h i c h   t e s t s   t o   r u n 
 
     - - e x c l u d e - f i l t e r   < p a t t e r n >                       E x c l u d e   t e s t s   f o r   t h e   s p e c i f i e d   f i l t e r   p a t t e r n 
 
     - - t e s t - s u f f i x   < s u f f i x e s >                           O n l y   s e a r c h   f o r   t e s t   i n   f i l e s   w i t h   s p e c i f i e d   s u f f i x ( e s ) .   D e f a u l t :   T e s t . p h p , . p h p t 
 
 
 
 E x e c u t i o n : 
 
 
 
     - - p r o c e s s - i s o l a t i o n                                     R u n   e a c h   t e s t   i n   a   s e p a r a t e   P H P   p r o c e s s 
 
     - - g l o b a l s - b a c k u p                                           B a c k u p   a n d   r e s t o r e   $ G L O B A L S   f o r   e a c h   t e s t 
 
     - - s t a t i c - b a c k u p                                             B a c k u p   a n d   r e s t o r e   s t a t i c   p r o p e r t i e s   f o r   e a c h   t e s t 
 
 
 
     - - s t r i c t - c o v e r a g e                                         B e   s t r i c t   a b o u t   c o d e   c o v e r a g e   m e t a d a t a 
 
     - - s t r i c t - g l o b a l - s t a t e                                 B e   s t r i c t   a b o u t   c h a n g e s   t o   g l o b a l   s t a t e 
 
     - - d i s a l l o w - t e s t - o u t p u t                               B e   s t r i c t   a b o u t   o u t p u t   d u r i n g   t e s t s 
 
     - - e n f o r c e - t i m e - l i m i t                                   E n f o r c e   t i m e   l i m i t   b a s e d   o n   t e s t   s i z e 
 
     - - d e f a u l t - t i m e - l i m i t   < s e c >                       T i m e o u t   i n   s e c o n d s   f o r   t e s t s   t h a t   h a v e   n o   d e c l a r e d   s i z e 
 
     - - d o - n o t - r e p o r t - u s e l e s s - t e s t s                 D o   n o t   r e p o r t   t e s t s   t h a t   d o   n o t   t e s t   a n y t h i n g 
 
 
 
     - - s t o p - o n - d e f e c t                                           S t o p   a f t e r   f i r s t   e r r o r ,   f a i l u r e ,   w a r n i n g ,   o r   r i s k y   t e s t 
 
     - - s t o p - o n - e r r o r                                             S t o p   a f t e r   f i r s t   e r r o r 
 
     - - s t o p - o n - f a i l u r e                                         S t o p   a f t e r   f i r s t   f a i l u r e 
 
     - - s t o p - o n - w a r n i n g                                         S t o p   a f t e r   f i r s t   w a r n i n g 
 
     - - s t o p - o n - r i s k y                                             S t o p   a f t e r   f i r s t   r i s k y   t e s t 
 
     - - s t o p - o n - d e p r e c a t i o n                                 S t o p   a f t e r   f i r s t   t e s t   t h a t   t r i g g e r e d   a   d e p r e c a t i o n 
 
     - - s t o p - o n - n o t i c e                                           S t o p   a f t e r   f i r s t   t e s t   t h a t   t r i g g e r e d   a   n o t i c e 
 
     - - s t o p - o n - s k i p p e d                                         S t o p   a f t e r   f i r s t   s k i p p e d   t e s t 
 
     - - s t o p - o n - i n c o m p l e t e                                   S t o p   a f t e r   f i r s t   i n c o m p l e t e   t e s t 
 
 
 
     - - f a i l - o n - e m p t y - t e s t - s u i t e                       S i g n a l   f a i l u r e   u s i n g   s h e l l   e x i t   c o d e   w h e n   n o   t e s t s   w e r e   r u n 
 
     - - f a i l - o n - w a r n i n g                                         S i g n a l   f a i l u r e   u s i n g   s h e l l   e x i t   c o d e   w h e n   a   w a r n i n g   w a s   t r i g g e r e d 
 
     - - f a i l - o n - r i s k y                                             S i g n a l   f a i l u r e   u s i n g   s h e l l   e x i t   c o d e   w h e n   a   t e s t   w a s   c o n s i d e r e d   r i s k y 
 
     - - f a i l - o n - d e p r e c a t i o n                                 S i g n a l   f a i l u r e   u s i n g   s h e l l   e x i t   c o d e   w h e n   a   d e p r e c a t i o n   w a s   t r i g g e r e d 
 
     - - f a i l - o n - p h p u n i t - d e p r e c a t i o n                 S i g n a l   f a i l u r e   u s i n g   s h e l l   e x i t   c o d e   w h e n   a   P H P U n i t   d e p r e c a t i o n   w a s   t r i g g e r e d 
 
     - - f a i l - o n - p h p u n i t - w a r n i n g                         S i g n a l   f a i l u r e   u s i n g   s h e l l   e x i t   c o d e   w h e n   a   P H P U n i t   w a r n i n g   w a s   t r i g g e r e d 
 
     - - f a i l - o n - n o t i c e                                           S i g n a l   f a i l u r e   u s i n g   s h e l l   e x i t   c o d e   w h e n   a   n o t i c e   w a s   t r i g g e r e d 
 
     - - f a i l - o n - s k i p p e d                                         S i g n a l   f a i l u r e   u s i n g   s h e l l   e x i t   c o d e   w h e n   a   t e s t   w a s   s k i p p e d 
 
     - - f a i l - o n - i n c o m p l e t e                                   S i g n a l   f a i l u r e   u s i n g   s h e l l   e x i t   c o d e   w h e n   a   t e s t   w a s   m a r k e d   i n c o m p l e t e 
 
     - - f a i l - o n - a l l - i s s u e s                                   S i g n a l   f a i l u r e   u s i n g   s h e l l   e x i t   c o d e   w h e n   a n   i s s u e   i s   t r i g g e r e d 
 
 
 
     - - d o - n o t - f a i l - o n - e m p t y - t e s t - s u i t e         D o   n o t   s i g n a l   f a i l u r e   u s i n g   s h e l l   e x i t   c o d e   w h e n   n o   t e s t s   w e r e   r u n 
 
     - - d o - n o t - f a i l - o n - w a r n i n g                           D o   n o t   s i g n a l   f a i l u r e   u s i n g   s h e l l   e x i t   c o d e   w h e n   a   w a r n i n g   w a s   t r i g g e r e d 
 
     - - d o - n o t - f a i l - o n - r i s k y                               D o   n o t   s i g n a l   f a i l u r e   u s i n g   s h e l l   e x i t   c o d e   w h e n   a   t e s t   w a s   c o n s i d e r e d   r i s k y 
 
     - - d o - n o t - f a i l - o n - d e p r e c a t i o n                   D o   n o t   s i g n a l   f a i l u r e   u s i n g   s h e l l   e x i t   c o d e   w h e n   a   d e p r e c a t i o n   w a s   t r i g g e r e d 
 
     - - d o - n o t - f a i l - o n - p h p u n i t - d e p r e c a t i o n   D o   n o t   s i g n a l   f a i l u r e   u s i n g   s h e l l   e x i t   c o d e   w h e n   a   P H P U n i t   d e p r e c a t i o n   w a s   t r i g g e r e d 
 
     - - d o - n o t - f a i l - o n - p h p u n i t - w a r n i n g           D o   n o t   s i g n a l   f a i l u r e   u s i n g   s h e l l   e x i t   c o d e   w h e n   a   P H P U n i t   w a r n i n g   w a s   t r i g g e r e d 
 
     - - d o - n o t - f a i l - o n - n o t i c e                             D o   n o t   s i g n a l   f a i l u r e   u s i n g   s h e l l   e x i t   c o d e   w h e n   a   n o t i c e   w a s   t r i g g e r e d 
 
     - - d o - n o t - f a i l - o n - s k i p p e d                           D o   n o t   s i g n a l   f a i l u r e   u s i n g   s h e l l   e x i t   c o d e   w h e n   a   t e s t   w a s   s k i p p e d 
 
     - - d o - n o t - f a i l - o n - i n c o m p l e t e                     D o   n o t   s i g n a l   f a i l u r e   u s i n g   s h e l l   e x i t   c o d e   w h e n   a   t e s t   w a s   m a r k e d   i n c o m p l e t e 
 
 
 
     - - c a c h e - r e s u l t                                               W r i t e   t e s t   r e s u l t s   t o   c a c h e   f i l e 
 
     - - d o - n o t - c a c h e - r e s u l t                                 D o   n o t   w r i t e   t e s t   r e s u l t s   t o   c a c h e   f i l e 
 
 
 
     - - o r d e r - b y   < o r d e r >                                       R u n   t e s t s   i n   o r d e r :   d e f a u l t | d e f e c t s | d e p e n d s | d u r a t i o n | n o - d e p e n d s | r a n d o m | r e v e r s e | s i z e 
 
     - - r a n d o m - o r d e r - s e e d   < N >                             U s e   t h e   s p e c i f i e d   r a n d o m   s e e d   w h e n   r u n n i n g   t e s t s   i n   r a n d o m   o r d e r 
 
 
 
 R e p o r t i n g : 
 
 
 
     - - c o l o r s   < f l a g >                                             U s e   c o l o r s   i n   o u t p u t   ( " n e v e r " ,   " a u t o "   o r   " a l w a y s " ) 
 
     - - c o l u m n s   < n >                                                 N u m b e r   o f   c o l u m n s   t o   u s e   f o r   p r o g r e s s   o u t p u t 
 
     - - c o l u m n s   m a x                                                 U s e   m a x i m u m   n u m b e r   o f   c o l u m n s   f o r   p r o g r e s s   o u t p u t 
 
     - - s t d e r r                                                           W r i t e   t o   S T D E R R   i n s t e a d   o f   S T D O U T 
 
 
 
     - - n o - p r o g r e s s                                                 D i s a b l e   o u t p u t   o f   t e s t   e x e c u t i o n   p r o g r e s s 
 
     - - n o - r e s u l t s                                                   D i s a b l e   o u t p u t   o f   t e s t   r e s u l t s 
 
     - - n o - o u t p u t                                                     D i s a b l e   a l l   o u t p u t 
 
 
 
     - - d i s p l a y - i n c o m p l e t e                                   D i s p l a y   d e t a i l s   f o r   i n c o m p l e t e   t e s t s 
 
     - - d i s p l a y - s k i p p e d                                         D i s p l a y   d e t a i l s   f o r   s k i p p e d   t e s t s 
 
     - - d i s p l a y - d e p r e c a t i o n s                               D i s p l a y   d e t a i l s   f o r   d e p r e c a t i o n s   t r i g g e r e d   b y   t e s t s 
 
     - - d i s p l a y - p h p u n i t - d e p r e c a t i o n s               D i s p l a y   d e t a i l s   f o r   P H P U n i t   d e p r e c a t i o n s 
 
     - - d i s p l a y - e r r o r s                                           D i s p l a y   d e t a i l s   f o r   e r r o r s   t r i g g e r e d   b y   t e s t s 
 
     - - d i s p l a y - n o t i c e s                                         D i s p l a y   d e t a i l s   f o r   n o t i c e s   t r i g g e r e d   b y   t e s t s 
 
     - - d i s p l a y - w a r n i n g s                                       D i s p l a y   d e t a i l s   f o r   w a r n i n g s   t r i g g e r e d   b y   t e s t s 
 
     - - d i s p l a y - a l l - i s s u e s                                   D i s p l a y   d e t a i l s   f o r   a l l   i s s u e s   t h a t   a r e   t r i g g e r e d 
 
     - - r e v e r s e - l i s t                                               P r i n t   d e f e c t s   i n   r e v e r s e   o r d e r 
 
 
 
     - - t e a m c i t y                                                       R e p l a c e   d e f a u l t   p r o g r e s s   a n d   r e s u l t   o u t p u t   w i t h   T e a m C i t y   f o r m a t 
 
     - - t e s t d o x                                                         R e p l a c e   d e f a u l t   r e s u l t   o u t p u t   w i t h   T e s t D o x   f o r m a t 
 
     - - t e s t d o x - s u m m a r y                                         R e p e a t   T e s t D o x   o u t p u t   f o r   t e s t s   w i t h   e r r o r s ,   f a i l u r e s ,   o r   i s s u e s 
 
 
 
     - - d e b u g                                                             R e p l a c e   d e f a u l t   p r o g r e s s   a n d   r e s u l t   o u t p u t   w i t h   d e b u g g i n g   i n f o r m a t i o n 
 
 
 
 L o g g i n g : 
 
 
 
     - - l o g - j u n i t   < f i l e >                                       W r i t e   t e s t   r e s u l t s   i n   J U n i t   X M L   f o r m a t   t o   f i l e 
 
     - - l o g - t e a m c i t y   < f i l e >                                 W r i t e   t e s t   r e s u l t s   i n   T e a m C i t y   f o r m a t   t o   f i l e 
 
     - - t e s t d o x - h t m l   < f i l e >                                 W r i t e   t e s t   r e s u l t s   i n   T e s t D o x   f o r m a t   ( H T M L )   t o   f i l e 
 
     - - t e s t d o x - t e x t   < f i l e >                                 W r i t e   t e s t   r e s u l t s   i n   T e s t D o x   f o r m a t   ( p l a i n   t e x t )   t o   f i l e 
 
     - - l o g - e v e n t s - t e x t   < f i l e >                           S t r e a m   e v e n t s   a s   p l a i n   t e x t   t o   f i l e 
 
     - - l o g - e v e n t s - v e r b o s e - t e x t   < f i l e >           S t r e a m   e v e n t s   a s   p l a i n   t e x t   w i t h   e x t e n d e d   i n f o r m a t i o n   t o   f i l e 
 
     - - n o - l o g g i n g                                                   I g n o r e   l o g g i n g   c o n f i g u r e d   i n   t h e   X M L   c o n f i g u r a t i o n   f i l e 
 
 
 
 C o d e   C o v e r a g e : 
 
 
 
     - - c o v e r a g e - c l o v e r   < f i l e >                           W r i t e   c o d e   c o v e r a g e   r e p o r t   i n   C l o v e r   X M L   f o r m a t   t o   f i l e 
 
     - - c o v e r a g e - c o b e r t u r a   < f i l e >                     W r i t e   c o d e   c o v e r a g e   r e p o r t   i n   C o b e r t u r a   X M L   f o r m a t   t o   f i l e 
 
     - - c o v e r a g e - c r a p 4 j   < f i l e >                           W r i t e   c o d e   c o v e r a g e   r e p o r t   i n   C r a p 4 J   X M L   f o r m a t   t o   f i l e 
 
     - - c o v e r a g e - h t m l   < d i r >                                 W r i t e   c o d e   c o v e r a g e   r e p o r t   i n   H T M L   f o r m a t   t o   d i r e c t o r y 
 
     - - c o v e r a g e - p h p   < f i l e >                                 W r i t e   s e r i a l i z e d   c o d e   c o v e r a g e   d a t a   t o   f i l e 
 
     - - c o v e r a g e - t e x t = < f i l e >                               W r i t e   c o d e   c o v e r a g e   r e p o r t   i n   t e x t   f o r m a t   t o   f i l e   [ d e f a u l t :   s t a n d a r d   o u t p u t ] 
 
     - - o n l y - s u m m a r y - f o r - c o v e r a g e - t e x t           O p t i o n   f o r   c o d e   c o v e r a g e   r e p o r t   i n   t e x t   f o r m a t :   o n l y   s h o w   s u m m a r y 
 
     - - s h o w - u n c o v e r e d - f o r - c o v e r a g e - t e x t       O p t i o n   f o r   c o d e   c o v e r a g e   r e p o r t   i n   t e x t   f o r m a t :   s h o w   u n c o v e r e d   f i l e s 
 
     - - c o v e r a g e - x m l   < d i r >                                   W r i t e   c o d e   c o v e r a g e   r e p o r t   i n   X M L   f o r m a t   t o   d i r e c t o r y 
 
     - - w a r m - c o v e r a g e - c a c h e                                 W a r m   s t a t i c   a n a l y s i s   c a c h e 
 
     - - c o v e r a g e - f i l t e r   < d i r >                             I n c l u d e   < d i r >   i n   c o d e   c o v e r a g e   r e p o r t i n g 
 
     - - p a t h - c o v e r a g e                                             R e p o r t   p a t h   c o v e r a g e   i n   a d d i t i o n   t o   l i n e   c o v e r a g e 
 
     - - d i s a b l e - c o v e r a g e - i g n o r e                         D i s a b l e   m e t a d a t a   f o r   i g n o r i n g   c o d e   c o v e r a g e 
 
     - - n o - c o v e r a g e                                                 I g n o r e   c o d e   c o v e r a g e   r e p o r t i n g   c o n f i g u r e d   i n   t h e   X M L   c o n f i g u r a t i o n   f i l e 
 
 
 
 M i s c e l l a n e o u s : 
 
 
 
     - h | - - h e l p                                                         P r i n t s   t h i s   u s a g e   i n f o r m a t i o n 
 
     - - v e r s i o n                                                         P r i n t s   t h e   v e r s i o n   a n d   e x i t s 
 
     - - a t l e a s t - v e r s i o n   < m i n >                             C h e c k s   t h a t   v e r s i o n   i s   g r e a t e r   t h a n   < m i n >   a n d   e x i t s 
 
     - - c h e c k - v e r s i o n                                             C h e c k s   w h e t h e r   P H P U n i t   i s   t h e   l a t e s t   v e r s i o n   a n d   e x i t s 
 
     - - c h e c k - p h p - c o n f i g u r a t i o n                         C h e c k s   w h e t h e r   P H P   c o n f i g u r a t i o n   f o l l o w s   b e s t   p r a c t i c e s 
 
 
 
 