diff --git a/src/Symfony/Component/HttpFoundation/File/File.php b/src/Symfony/Component/HttpFoundation/File/File.php index 87c1606d4a..b575c8592e 100644 --- a/src/Symfony/Component/HttpFoundation/File/File.php +++ b/src/Symfony/Component/HttpFoundation/File/File.php @@ -87,20 +87,6 @@ class File extends \SplFileInfo return $guesser->guess($this->getPathname()); } - /** - * Returns the extension of the file. - * - * \SplFileInfo::getExtension() is not available before PHP 5.3.6 - * - * @return string The extension - * - * @api - */ - public function getExtension() - { - return pathinfo($this->getBasename(), PATHINFO_EXTENSION); - } - /** * Moves the file to a new location. * diff --git a/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php b/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php index 1f89c391d5..9e07d9e14b 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php @@ -148,12 +148,6 @@ class FileTest extends \PHPUnit_Framework_TestCase @rmdir($targetDir); } - public function testGetExtension() - { - $file = new File(__DIR__.'/Fixtures/test.gif'); - $this->assertEquals('gif', $file->getExtension()); - } - protected function createMockGuesser($path, $mimeType) { $guesser = $this->getMock('Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface');