Skip to content

Commit

Permalink
bug 1015011 - fix PHP tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rhelmer committed May 23, 2014
1 parent 623ccb9 commit 72aed66
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 416 deletions.
3 changes: 3 additions & 0 deletions .gitignore
@@ -1,4 +1,7 @@
*.pyc
local_settings.py
settings.py
bouncer/php/cfg/config.php
sentry/sentry.cfg
.venv
bouncer/php/cfg/config.php.bak
16 changes: 16 additions & 0 deletions bin/jenkins.sh
@@ -0,0 +1,16 @@
#!/bin/bash
set -e

# PHP tests
export FILEPATH="`pwd`/bouncer/php/"
pushd bouncer/php/cfg
cp config-dist.php config.php
sed -i .bak "s%/var/www/download%$FILEPATH%" config.php
popd
pushd bouncer/tests
# FIXME replace w/ phpunit
for f in *.php
do
php -q $f
done
popd
223 changes: 0 additions & 223 deletions bouncer/php/lib/sdo.php

This file was deleted.

45 changes: 0 additions & 45 deletions bouncer/tests/functions.php

This file was deleted.

18 changes: 18 additions & 0 deletions bouncer/tests/mocks/memcaching.php
Expand Up @@ -54,12 +54,30 @@ function delete($key, $timeout = null) {
return true;
}

/**
* Returns key in the appropriate namespace.
* @param string $key memcache key
* @return string Namespaced key
*/
function namespaceKey($key) {
$this->namespace = 'ns';
return $this->namespace . $key;
}

/**
* Flush the cache
* @return bool success
*/
function flush() {
return true;
}

/**
* Get server statistics.
* return array
*/
function getExtendedStats() {
return [];
}
}
?>
21 changes: 0 additions & 21 deletions bouncer/tests/mocks/sdo.php

This file was deleted.

0 comments on commit 72aed66

Please sign in to comment.