Bug Report #3675
Problem with Kohana_CoreTest::test_find_file_returns_false_or_array_on_failure
|Assignee:||Jeremy Bush||% Done:|
<boolean:false> does not match expected type "array".
This test fails if caching is TRUE. Here are the tests that are run:
$this->assertFalse(Kohana::find_file('configy', 'zebra')); $this->assertSame(array(), Kohana::find_file('configy', 'zebra', NULL, TRUE));
The first time that it is run, the result is cached so the second test fails because the FALSE boolean is returned instead of an array. The solution for this is to test different options each time config, zebra and then configy, giraffe for instance.
Additionally, the comment for this test should probably be updated as it does not appear to be correct in explaining the case for returning an array. It is only ever trying to find one file, not multiple. Current description reads:
If a file can't be found then find_file() should return FALSE if only a single file was requested, or an empty array if multiple files (i.e. configuration files) were requested.
#8 Updated by Jeremy Bush over 3 years ago
- Status changed from New to Closed
- Assignee set to Jeremy Bush
- % Done changed from 0 to 100
- Resolution set to fixed