Skip to content

Commit

Permalink
More schema util functino testing
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Sep 13, 2012
1 parent 657c878 commit 30d2012
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/LazyRecord/UtilsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,22 @@ function testEvaluate()
is( 1, LazyRecord\Utils::evaluate(1) );
is( 2, LazyRecord\Utils::evaluate( function() { return 2; }) );
}

function testSchemaUtil()
{
$loader = new LazyRecord\ConfigLoader;
ok($loader);
$loader->loadFromSymbol(true); // force loading
$loader->initForBuild();

$paths = $loader->getSchemaPaths();
ok($paths);
ok(is_array($paths));

$schemas = LazyRecord\Utils::getSchemaClassFromPathsOrClassNames($loader,array('tests\\UserSchema'));
ok($schemas);


}
}

0 comments on commit 30d2012

Please sign in to comment.