lithium\tests\cases\g11n\catalog\adapter\PhpTest::testReadWithScope PHP Method

testReadWithScope() public method

public testReadWithScope ( )
    public function testReadWithScope()
    {
        mkdir("{$this->_path}/fr/message", 0755, true);
        $data = <<<EOD
<?php
return array(
\t'politics' => 'politique'
);
?>
EOD;
        file_put_contents("{$this->_path}/fr/message/li3_docs.php", $data);
        $result = $this->adapter->read('message', 'fr', null);
        $this->assertEmpty($result);
        $result = $this->adapter->read('message', 'fr', 'li3_docs');
        $expected = array('politics' => array('id' => 'politics', 'ids' => array(), 'translated' => 'politique', 'flags' => array(), 'comments' => array(), 'occurrences' => array()));
        $this->assertEqual($expected, $result);
    }