Created
May 29, 2012 14:56
-
-
Save mikeemoo/2828892 to your computer and use it in GitHub Desktop.
ExampleInheritanceFunctionalTest
This file contains hidden or 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
| <?php | |
| namespace Lowpress\ExampleBundle\Tests\Entity; | |
| use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | |
| class ExampleInheritanceFunctionalTest extends WebTestCase | |
| { | |
| /** | |
| * @var \Doctrine\ORM\EntityManager | |
| */ | |
| private $em; | |
| public function setUp() | |
| { | |
| $kernel = static::createKernel(); | |
| $kernel->boot(); | |
| $this->em = $kernel->getContainer()->get('doctrine.orm.entity_manager'); | |
| } | |
| public function testSelectContentPage() | |
| { | |
| $repos = $this->em->getRepository('LowpressExampleBundle:ContentPage'); | |
| $results = $repos->findAll(); | |
| $this->assertCount(1, $results); | |
| $repos = $this->em->getRepository('LowpressCmsBundle:HtmlPage'); | |
| $results = $repos->findAll(); | |
| $this->assertGreaterThanOrEqual(2, count($results)); | |
| foreach ($results as $result){ | |
| $this->assertTrue(is_a($result, "Lowpress\CmsBundle\Entity\HtmlPage")); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment