Code Duplication    Length = 11-11 lines in 4 locations

tests/Khepin/Tests/MongoFixtureTest.php 2 locations

@@ 54-64 (lines=11) @@
51
        $this->assertEquals(get_class($date), get_class($car->getDatePurchased()));
52
    }
53
54
    public function testLoadSingleFile()
55
    {
56
        $loader = new YamlLoader($this->kernel, array('SomeBundle/cars'), 'DataFixtures');
57
        $loader->loadFixtures();
58
59
        $dm = $this->doctrine->getManager();
60
        $cars = $dm->getRepository('Khepin\Fixture\Document\Car')->findAll();
61
        $this->assertEquals(2, count($cars));
62
        $drivers = $dm->getRepository('Khepin\Fixture\Document\Driver')->findAll();
63
        $this->assertEquals(0, count($drivers));
64
    }
65
66
    public function testSingleFileLoadedOnlyOnce()
67
    {
@@ 66-76 (lines=11) @@
63
        $this->assertEquals(0, count($drivers));
64
    }
65
66
    public function testSingleFileLoadedOnlyOnce()
67
    {
68
        $loader = new YamlLoader($this->kernel, array('SomeBundle/cars', 'SomeBundle'), 'DataFixtures');
69
        $loader->loadFixtures();
70
71
        $em = $this->doctrine->getManager();
72
        $cars = $em->getRepository('Khepin\Fixture\Document\Car')->findAll();
73
        $this->assertEquals(2, count($cars));
74
        $drivers = $em->getRepository('Khepin\Fixture\Document\Driver')->findAll();
75
        $this->assertEquals(0, count($drivers));
76
    }
77
78
    public function testPurge()
79
    {

tests/Khepin/Tests/YamlFixtureTest.php 2 locations

@@ 55-65 (lines=11) @@
52
        $this->assertEquals('BMW', $car->getName());
53
    }
54
55
    public function testLoadSingleFile()
56
    {
57
        $loader = new YamlLoader($this->kernel, array('SomeBundle/cars'), 'DataFixtures');
58
        $loader->loadFixtures();
59
60
        $em = $this->doctrine->getManager();
61
        $cars = $em->getRepository('Khepin\Fixture\Entity\Car')->findAll();
62
        $this->assertEquals(2, count($cars));
63
        $drivers = $em->getRepository('Khepin\Fixture\Entity\Driver')->findAll();
64
        $this->assertEquals(0, count($drivers));
65
    }
66
67
    public function testSingleFileLoadedOnlyOnce()
68
    {
@@ 67-77 (lines=11) @@
64
        $this->assertEquals(0, count($drivers));
65
    }
66
67
    public function testSingleFileLoadedOnlyOnce()
68
    {
69
        $loader = new YamlLoader($this->kernel, array('SomeBundle/cars', 'SomeBundle'), 'DataFixtures');
70
        $loader->loadFixtures();
71
72
        $em = $this->doctrine->getManager();
73
        $cars = $em->getRepository('Khepin\Fixture\Entity\Car')->findAll();
74
        $this->assertEquals(2, count($cars));
75
        $drivers = $em->getRepository('Khepin\Fixture\Entity\Driver')->findAll();
76
        $this->assertEquals(0, count($drivers));
77
    }
78
79
    public function testContext()
80
    {