Ignore:
Timestamp:
Feb 20, 2014 3:03:59 AM (10 years ago)
Author:
anonymous
Message:

Completed integrating /branches/eli_branch into /trunk. Changes include:

  • Removed closing ?> from end of files
  • Upgrade old-style contructor methods to use construct() instead.
  • Class properties and methods defined as public, private, static or protected
  • Ensure code runs under E_ALL with only mysql_* deprecated warnings
  • Search for the '@' symbol anywhere it might be used to supress runtime errors, then replace with proper error recovery.
  • Run the php cli -l option to check files for syntax errors.
  • Bring tests up-to-date with latest version and methods of PHPUnit
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tests/run_tests.sh

    r399 r468  
    1 #!/bin/sh
     1#!/bin/bash
     2
     3# This script sets-up the test environment and runs all tests.
     4# You'll want to define your local mysql credentials for a test
     5# database as environment variables, e.g., in ~/.bash_profile:
     6#  export DB_NAME="test"
     7#  export DB_USER="test"
     8#  export DB_PASS="..."
    29
    310# Be in the directory with all the tests.
    411cd `dirname $0`;
    512
     13# Get required ENV variables.
     14if [[ -z "$DB_USER$DB_PASS$DB_NAME" ]]; then
     15    echo "MySQL test DB credential environment variables are missing.\nSet these in ~/.bash_profile to avoid seeing these prompts each time.";
     16fi
     17for E in DB_USER DB_PASS DB_NAME; do
     18    while [[ -z ${!E} ]]; do
     19        read -p "$E: " $E;
     20    done
     21    export $E;
     22done
     23
    624# Create database.
    725mysql -e 'CREATE DATABASE IF NOT EXISTS `test`';
    826
    9 # Run tests sequentially.
    10 for foo in *Test.php;
    11 do
    12     php $foo;
    13 done;
     27# Go!
     28echo "Running the tests!";
     29echo "You'll want to 'tail -f /tmp/codebase_test_log' and watch for errors.";
     30
     31# Config options go in phpunit.xml
     32# phpunit --tap | grep -v '^ok '
     33phpunit --stderr
Note: See TracChangeset for help on using the changeset viewer.