Skip to content
Permalink
Browse files

Adding ini file and more tests for types.

  • Loading branch information...
markstory committed Dec 4, 2010
1 parent 98704d3 commit 159f25ff0f02ad3f1e54ac38d2460e9d98ac6035
Showing with 25 additions and 2 deletions.
  1. +8 −2 cake/tests/cases/libs/config/ini_reader.test.php
  2. +17 −0 cake/tests/test_app/config/nested.ini
@@ -87,10 +87,16 @@ function testReadingValuesWithDots() {
function testBooleanReading() {
$reader = new IniReader($this->path);
$config = $reader->read('nested.ini');
$this->assertTrue($config['bools']['test_on']);
$this->assertFalse($config['bools']['test_off']);
$this->assertTrue($config['bools']['test_yes']);
$this->assertFalse($config['bools']['test_no']);
$this->assertFalse($config['bools']['test_off']);
$this->assertTrue($config['bools']['test_true']);
$this->assertFalse($config['bools']['test_false']);
$this->assertFalse($config['bools']['test_null']);
}
}
@@ -0,0 +1,17 @@
; Test file for testing ini files with . syntax
[database]
db.username = mark
db.password = secret

[nesting]
one.two.three = 3
a.b.c.d = On

[bools]
test_on = on
test_off = off
test_yes = yes
test_no = no
test_true = true
test_false = false
test_null = null

0 comments on commit 159f25f

Please sign in to comment.
You can’t perform that action at this time.