public static function setUpBeforeClass() { parent::setUpBeforeClass(); Repository::setDefaultRepositoryClassName(MySql::class); self::SetDefaultConnectionSettings(); Log::DisableLogging(); $unitTestingSolutionSchema = new UnitTestingSolutionSchema(); $unitTestingSolutionSchema->checkModelSchemas(); // Make sure the test model objects have the any other repository disconnected. Model::deleteRepositories(); }
protected function setUp() { unset($this->list); parent::setUp(); $example = new \Rhubarb\Stem\Tests\Fixtures\Example(); $example->getRepository()->clearObjectCache(); $example->Forename = "John"; $example->save(); $example = new \Rhubarb\Stem\Tests\Fixtures\Example(); $example->Forename = "Mary"; $example->save(); $example = new \Rhubarb\Stem\Tests\Fixtures\Example(); $example->Forename = "Tom"; $example->Surname = "Thumb"; $example->save(); $this->list = new Collection("\\Rhubarb\\Stem\\Tests\\Fixtures\\Example"); }