This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Validates a given latitude $lat | |
* | |
* @param float|int|string $lat Latitude | |
* @return bool `true` if $lat is valid, `false` if not | |
*/ | |
function validateLatitude($lat) { | |
return preg_match('/^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$/', $lat); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// we're loading the Database TestCase here | |
require 'PHPUnit' . DIRECTORY_SEPARATOR . 'Extensions' . | |
DIRECTORY_SEPARATOR . 'Database' . DIRECTORY_SEPARATOR . | |
'TestCase.php'; | |
class FixtureTestCase extends PHPUnit_Extensions_Database_TestCase { | |
public $fixtures = array( | |
'posts', |