Test_Import::test_load_file()
Source
File: tests/test-import.php
public function test_load_file() { $path = dirname( __FILE__ ) . '/recipes/sample-json.json'; $expected_result = array ( 'name' => 'John', 'age' => 31, 'city' => 'New York', 'children' => array("Jack", "Sarah") ); $actual_result = $this->importer->load_file( $path ); $this->assertSame( $expected_result, $actual_result ); }
Expand full source code Collapse full source code View on Github