1234567891011121314151617181920212223242526 |
- <?php
- /**
- * Created by PhpStorm.
- * User: stanley-king
- * Date: 16/6/24
- * Time: 上午1:20
- */
- define('BASE_ROOT_PATH',str_replace('/test','',dirname(__FILE__)));
- require_once(BASE_ROOT_PATH . '/helper/algorithm.php');
- class algorithm_helperTest extends PHPUnit_Framework_TestCase
- {
- public function testSearch()
- {
- $mobiles = array('13911129897','13951129867','13916129867','13918129867','13911179867','13911109867');
- sort($mobiles);
- $ret = algorithm::bsearch('13911109867',$mobiles);
-
- $ret = $mobiles[$ret];
- $x = $mobiles[0];
- }
- }
|