mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
Add readPHPData() and writePHPData() to Storage class
This commit is contained in:
parent
820e29b5ba
commit
4fa3bf8cfb
2 changed files with 45 additions and 0 deletions
|
|
@ -132,6 +132,15 @@ class StorageTest extends \Codeception\TestCase\Test
|
|||
$this->assertEquals('foobarbazzjazz', file_get_contents($testfile));
|
||||
}
|
||||
|
||||
public function testReadWritePHPData()
|
||||
{
|
||||
$testfile = \RX_BASEDIR . 'tests/_output/test.php';
|
||||
$data = array('foo' => 'bar', 'baz' => array('rhymix' => '\'"special\\chars' . chr(0) . chr(255), 'test' => 'wow'));
|
||||
|
||||
$this->assertTrue(Rhymix\Framework\Storage::writePHPData($testfile, $data));
|
||||
$this->assertEquals($data, Rhymix\Framework\Storage::readPHPData($testfile));
|
||||
}
|
||||
|
||||
public function testCopy()
|
||||
{
|
||||
$source = \RX_BASEDIR . 'tests/_output/copy.source.txt';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue