Created
October 17, 2011 20:51
-
-
Save xosofox/1293760 to your computer and use it in GitHub Desktop.
autoload config for PropelBundle tests with Symfony2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//had to add these prefixes to my autoload for the php-unit tests to run | |
//app/autoload.php | |
$loader->registerPrefixes(array( | |
'Twig_Extensions_' => __DIR__.'/../vendor/twig-extensions/lib', | |
'Twig_' => __DIR__.'/../vendor/twig/lib', | |
'BaseObject' => __DIR__.'/../vendor/propel/runtime/lib/om', | |
'Persistent' => __DIR__.'/../vendor/propel/runtime/lib/om', | |
'Propel' => __DIR__.'/../vendor/propel/runtime/lib', | |
)); | |
//MediaFileTest.php | |
<?php | |
namespace Xosofox\MedusaBundle\Tests\Model; | |
use \Xosofox\MedusaBundle\Model\MediaFile; | |
use \BaseObject; | |
class MediaFileTest extends \PHPUnit_Framework_TestCase | |
{ | |
public function testAnalyse() | |
{ | |
$f=new MediaFile(); | |
$f->setFilepath("/var/wwwroot/medusa/mountpoint/Music/MP3 Unsorted/Aerosmith - I Dont Want To Miss A Thing.mp3"); | |
$f->analyse(); | |
$this->assertEquals("Aerosmith",$f->getArtist()); | |
$this->assertEquals("I Don't Want To Miss A Thing",$f->getTitle()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Any idea/hint where to look for it? So I could try replicate the issue with a vanilla project and maybe create a fix