/** * Tests Jam::register() * * @dataProvider provider_register */ public function test_register($model, $expected) { $this->assertSame(Jam::register($model), $expected); }
/** * Gets a particular set of metadata about a model. If the model * isn't registered, it will attempt to register it. * * FALSE is returned on failure. * * @param string|Jam_Model $model * @return Jam_Meta */ public static function meta($model) { $model = Jam::model_name($model); if (!isset(Jam::$_models[$model])) { if (!Jam::register($model)) { return FALSE; } } return Jam::$_models[$model]; }