Permalink
Browse files

[Tests] Fix TwigLoaderRepository test

  • Loading branch information...
benja-M-1 committed Nov 26, 2011
1 parent 7248293 commit e9553eb7a75891ae500c010fbe30962a9d418c54
Showing with 5 additions and 8 deletions.
  1. +4 −6 Tests/Extensions/TwigLoaderRepositoryTest.php
  2. +1 −2 Tests/Test.php
@@ -54,9 +54,7 @@ protected function getTwigLoader()
*/
public function testGetSource()
{
- print_r("\n> Test \"getSource\" function");
-
- $source = $this->getTwigLoader()->getSource('page:homepage');
+ $source = $this->getTwigLoader()->getSource('page:Homepage');
$this->assertRegExp('/id="homepage"/', $source);
$source = $this->getTwigLoader()->getSource('layout:normal');
@@ -69,23 +67,23 @@ public function testGetSource()
$this->getTwigLoader()->getSource('doesnotexist');
$this->fail('Exception missing');
}
- catch (Twig_Error_Loader $expected) {
+ catch (\Twig_Error_Loader $expected) {
$this->assertTrue(true);
}
try {
$this->getTwigLoader()->getSource('layout:doesnotexist');
$this->fail('Exception missing');
}
- catch (Twig_Error_Loader $expected) {
+ catch (\Twig_Error_Loader $expected) {
$this->assertTrue(true);
}
try {
$this->getTwigLoader()->getSource('doesnotexist:bonsoir');
$this->fail('Exception missing');
}
- catch (Twig_Error_Loader $expected) {
+ catch (\Twig_Error_Loader $expected) {
$this->assertTrue(true);
}
}
View
@@ -18,10 +18,9 @@
namespace Theodo\RogerCmsBundle\Tests;
-use Theodo\RogerCmsBundle\Tests\RogerCmsTestKernel;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
-use Doctrine\ORM\Tools\SchemaTool;
use Symfony\Bundle\DoctrineFixturesBundle\Common\DataFixtures\Loader as DataFixturesLoader;
+use Doctrine\ORM\Tools\SchemaTool;
use Doctrine\Common\DataFixtures\Executor\ORMExecutor;
use Doctrine\Common\DataFixtures\Purger\ORMPurger;

0 comments on commit e9553eb

Please sign in to comment.