Kohana v3.3.5

This commit is contained in:
Deon George
2016-05-01 20:50:24 +10:00
parent 8888719653
commit 68c7f4f159
170 changed files with 4565 additions and 1176 deletions

View File

@@ -5,7 +5,7 @@
*
* @group kohana
* @group kohana.core
* @group kohana.core.url
* @group kohana.core.file
*
* @package Kohana
* @category Tests
@@ -25,8 +25,7 @@ class Kohana_FileTest extends Unittest_TestCase
{
return array(
// $value, $result
array(Kohana::find_file('classes', 'File')),
array(Kohana::find_file('tests', 'test_data/github', 'png')),
array(Kohana::find_file('tests', 'test_data/github', 'png'), 'image/png'),
);
}
@@ -38,12 +37,10 @@ class Kohana_FileTest extends Unittest_TestCase
* @param boolean $input Input for File::mime
* @param boolean $expected Output for File::mime
*/
public function test_mime($input)
public function test_mime($input, $expected)
{
$this->markTestSkipped(
'This test doesn\'t do anything useful!'
);
$this->assertSame(1, preg_match('/^(?:application|audio|image|message|multipart|text|video)\/[a-z.+0-9-]+$/i', File::mime($input)));
//@todo: File::mime coverage needs significant improvement or to be dropped for a composer package - it's a "horribly unreliable" method with very little testing
$this->assertSame($expected, File::mime($input));
}
/**