Skip to content

Instantly share code, notes, and snippets.

@scrummitch
Created November 5, 2015 00:11
Show Gist options
  • Save scrummitch/d056def489bf69a9a3e8 to your computer and use it in GitHub Desktop.
Save scrummitch/d056def489bf69a9a3e8 to your computer and use it in GitHub Desktop.
Model Testcase that is slow
<?php
/**
* @codeCoverageIgnoreStart
*/
class Unittest_Model_TestCase extends Unittest_Database_TestCase {
// Set the Unit Test database connection for our ORM calls
public static function setUpBeforeClass()
{
Database::$default = Kohana::$config->load('unittest.db_connection');
}
/**
* @var string Database connection used by Database_Testcase
*/
protected $_database_connection = 'test';
protected function getDataSet()
{
return new Unittest_DBUnit_ArrayDataSet(Kohana::load(Kohana::find_file('tests', 'dataset')));
}
public function setUp()
{
parent::setUp();
Request_Client_External::$client = 'Request_Client_Curl';
Kohana::$base_url = 'http://dev.verbate.co/';
$_SERVER['argv'] = NULL;
}
} // End Unittest_DBUnit_TestCase
/**
* @codeCoverageIgnoreEnd
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment