Changeset 347546
- Timestamp:
- 02/19/2011 01:17:04 AM (15 years ago)
- Location:
- twitter-api-shortcodes/trunk
- Files:
-
- 4 added
- 1 edited
- 2 moved
-
phpunit.xml (added)
-
tasforwp.class.inc.php (modified) (1 diff)
-
tests/integration (added)
-
tests/integration/common.inc (added)
-
tests/integration/tasforwpTest.php (moved) (moved from twitter-api-shortcodes/trunk/tests/tasforwpTest.php) (1 diff)
-
tests/unit (added)
-
tests/unit/functionsTest.php (moved) (moved from twitter-api-shortcodes/trunk/tests/functionsTest.php)
Legend:
- Unmodified
- Added
- Removed
-
twitter-api-shortcodes/trunk/tasforwp.class.inc.php
r347518 r347546 13 13 public static function StaticInit($wpdb) 14 14 { 15 TasForWp::$_wpdb = $wpdb;16 TasForWp::$StatusByIdTableName = TasForWp::$_wpdb->prefix . 'tas_status_by_id';17 TasForWp::$StatusSearchTableName = TasForWp::$_wpdb->prefix . 'tas_status_search';18 TasForWp::$SearchTableName = TasForWp::$_wpdb->prefix . 'tas_search';15 TasForWp::$_wpdb = $wpdb; 16 TasForWp::$StatusByIdTableName = TasForWp::$_wpdb->prefix . 'tas_status_by_id'; 17 TasForWp::$StatusSearchTableName = TasForWp::$_wpdb->prefix . 'tas_status_search'; 18 TasForWp::$SearchTableName = TasForWp::$_wpdb->prefix . 'tas_search'; 19 19 } 20 20 -
twitter-api-shortcodes/trunk/tests/integration/tasforwpTest.php
r347518 r347546 1 1 <?php 2 2 require_once('common.inc'); 3 3 require_once('functions.php'); 4 5 function register_activation_hook($path, $callbackName) {}6 function register_deactivation_hook($path, $callbackName) {}7 8 require_once('MockPress/mockpress.php');9 4 require_once('tasforwp.class.inc.php'); 10 11 require_once('PHPUnit/Framework.php'); 5 require_once('PHPUnit/Autoload.php'); 12 6 13 7 class TasForWPTests extends PHPUnit_Framework_TestCase { 14 8 public function testTasInstall() { 15 $wpdb = $this->getMock('wpdb', array('get_var')); 16 17 $wpdb->expects($this->once()) 18 ->method('get_var'); 19 TasForWp::StaticInit($wpdb); 20 TasForWp::tas_install(); 9 TasForWp::tas_install(); 10 assert(json_decode(get_option('tas_db_info'))->db_version == TAS_DB_VERSION); 21 11 } 22 12 }
Note: See TracChangeset
for help on using the changeset viewer.