Renaming method to match other core classes with similar features.

This commit is contained in:
mark_story 2010-12-04 00:10:42 -05:00
parent 9b8456ce6f
commit da632fe191
2 changed files with 4 additions and 4 deletions

View file

@ -264,14 +264,14 @@ class Configure {
* *
* To add a new reader to Configure: * To add a new reader to Configure:
* *
* `Configure::reader('ini', new IniReader());` * `Configure::config('ini', new IniReader());`
* *
* @param string $alias The name of the reader being configured. This alias is used later to * @param string $alias The name of the reader being configured. This alias is used later to
* read values from a specific reader. * read values from a specific reader.
* @param ConfigReaderInterface $reader The reader to append. * @param ConfigReaderInterface $reader The reader to append.
* @return void * @return void
*/ */
public static function reader($alias, ConfigReaderInterface $reader) { public static function config($alias, ConfigReaderInterface $reader) {
self::$_readers[$alias] = $reader; self::$_readers[$alias] = $reader;
} }

View file

@ -265,7 +265,7 @@ class ConfigureTest extends CakeTestCase {
*/ */
function testReaderSetup() { function testReaderSetup() {
$reader = new PhpReader(); $reader = new PhpReader();
Configure::reader('test', $reader); Configure::config('test', $reader);
$configured = Configure::configured(); $configured = Configure::configured();
$this->assertTrue(in_array('test', $configured)); $this->assertTrue(in_array('test', $configured));
@ -279,7 +279,7 @@ class ConfigureTest extends CakeTestCase {
*/ */
function testReaderExceptionOnIncorrectClass() { function testReaderExceptionOnIncorrectClass() {
$reader = new StdClass(); $reader = new StdClass();
Configure::reader('test', $reader); Configure::config('test', $reader);
} }
} }