function it_converts_node_to_places_dictionary_entry(ObjectManager $om) { $xml = <<<EOT <row> <col name="RM">02</col> <col name="NAZWA_RM">kolonia </col> <col name="STAN_NA">2013-02-28</col> </row> EOT; $placeType = new PlaceType(2); $placeType->setName('kolonia'); $this->beConstructedWith(new \SimpleXMLElement($xml), $om); $this->convertToEntity()->shouldBeLike($placeType); }
protected function createPlaceType($type, $name) { $placeType = new PlaceType($type); $placeType->setName($name); $this->kernel->getContainer()->get('doctrine')->getManager()->persist($placeType); $this->kernel->getContainer()->get('doctrine')->getManager()->flush(); }