Fix tests
This commit is contained in:
@@ -24,7 +24,7 @@ class PostController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[Route('/new', name: 'app_post_new', methods: ['GET', 'POST'])]
|
#[Route('/new', name: 'app_post_new', methods: ['GET', 'POST'])]
|
||||||
#[IsGranted('ROLE_USER', message: 'You must be logged in to access this page.')]
|
#[IsGranted('ROLE_USER')]
|
||||||
public function new(Request $request, EntityManagerInterface $entityManager): Response
|
public function new(Request $request, EntityManagerInterface $entityManager): Response
|
||||||
{
|
{
|
||||||
$post = new Post();
|
$post = new Post();
|
||||||
@@ -53,7 +53,7 @@ class PostController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[Route('/{id}/edit', name: 'app_post_edit', methods: ['GET', 'POST'])]
|
#[Route('/{id}/edit', name: 'app_post_edit', methods: ['GET', 'POST'])]
|
||||||
#[IsGranted('ROLE_USER', message: 'You must be logged in to access this page.')]
|
#[IsGranted('ROLE_USER')]
|
||||||
public function edit(Request $request, Post $post, EntityManagerInterface $entityManager): Response
|
public function edit(Request $request, Post $post, EntityManagerInterface $entityManager): Response
|
||||||
{
|
{
|
||||||
$form = $this->createForm(PostType::class, $post);
|
$form = $this->createForm(PostType::class, $post);
|
||||||
@@ -72,10 +72,10 @@ class PostController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[Route('/{id}', name: 'app_post_delete', methods: ['POST'])]
|
#[Route('/{id}', name: 'app_post_delete', methods: ['POST'])]
|
||||||
#[IsGranted('ROLE_USER', message: 'You must be logged in to access this page.')]
|
#[IsGranted('ROLE_USER')]
|
||||||
public function delete(Request $request, Post $post, EntityManagerInterface $entityManager): Response
|
public function delete(Request $request, Post $post, EntityManagerInterface $entityManager): Response
|
||||||
{
|
{
|
||||||
if ($this->isCsrfTokenValid('delete'.$post->getId(), $request->getPayload()->get('_token'))) {
|
if ($this->isCsrfTokenValid('delete'.$post->getId(), (string) $request->getPayload()->get('_token'))) {
|
||||||
$entityManager->remove($post);
|
$entityManager->remove($post);
|
||||||
$entityManager->flush();
|
$entityManager->flush();
|
||||||
}
|
}
|
||||||
|
@@ -24,7 +24,7 @@ class SpeciesController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[Route('/new', name: 'app_species_new', methods: ['GET', 'POST'])]
|
#[Route('/new', name: 'app_species_new', methods: ['GET', 'POST'])]
|
||||||
#[IsGranted('ROLE_USER', message: 'You must be logged in to access this page.')]
|
#[IsGranted('ROLE_USER')]
|
||||||
public function new(Request $request, EntityManagerInterface $entityManager): Response
|
public function new(Request $request, EntityManagerInterface $entityManager): Response
|
||||||
{
|
{
|
||||||
$species = new Species();
|
$species = new Species();
|
||||||
@@ -53,7 +53,7 @@ class SpeciesController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[Route('/{id}/edit', name: 'app_species_edit', methods: ['GET', 'POST'])]
|
#[Route('/{id}/edit', name: 'app_species_edit', methods: ['GET', 'POST'])]
|
||||||
#[IsGranted('ROLE_USER', message: 'You must be logged in to access this page.')]
|
#[IsGranted('ROLE_USER')]
|
||||||
public function edit(Request $request, Species $species, EntityManagerInterface $entityManager): Response
|
public function edit(Request $request, Species $species, EntityManagerInterface $entityManager): Response
|
||||||
{
|
{
|
||||||
$form = $this->createForm(SpeciesType::class, $species);
|
$form = $this->createForm(SpeciesType::class, $species);
|
||||||
@@ -72,10 +72,10 @@ class SpeciesController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[Route('/{id}', name: 'app_species_delete', methods: ['POST'])]
|
#[Route('/{id}', name: 'app_species_delete', methods: ['POST'])]
|
||||||
#[IsGranted('ROLE_USER', message: 'You must be logged in to access this page.')]
|
#[IsGranted('ROLE_USER')]
|
||||||
public function delete(Request $request, Species $species, EntityManagerInterface $entityManager): Response
|
public function delete(Request $request, Species $species, EntityManagerInterface $entityManager): Response
|
||||||
{
|
{
|
||||||
if ($this->isCsrfTokenValid('delete'.$species->getId(), $request->getPayload()->get('_token'))) {
|
if ($this->isCsrfTokenValid('delete'.$species->getId(), (string) $request->getPayload()->get('_token'))) {
|
||||||
$entityManager->remove($species);
|
$entityManager->remove($species);
|
||||||
$entityManager->flush();
|
$entityManager->flush();
|
||||||
}
|
}
|
||||||
|
@@ -4,17 +4,29 @@ namespace App\DataFixtures;
|
|||||||
|
|
||||||
use App\Entity\Post;
|
use App\Entity\Post;
|
||||||
use App\Entity\Species;
|
use App\Entity\Species;
|
||||||
|
use App\Entity\User;
|
||||||
use DateTimeImmutable;
|
use DateTimeImmutable;
|
||||||
use Doctrine\Bundle\FixturesBundle\Fixture;
|
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||||
use Doctrine\Persistence\ObjectManager;
|
use Doctrine\Persistence\ObjectManager;
|
||||||
|
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
|
||||||
|
|
||||||
class AppFixtures extends Fixture
|
class AppFixtures extends Fixture
|
||||||
{
|
{
|
||||||
|
public function __construct(
|
||||||
|
private readonly UserPasswordHasherInterface $passwordHasher
|
||||||
|
)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public function load(ObjectManager $manager): void
|
public function load(ObjectManager $manager): void
|
||||||
{
|
{
|
||||||
|
$user = (new User())->setEmail('test@test.fr');
|
||||||
|
$user->setPassword($this->passwordHasher->hashPassword($user, 'password'));
|
||||||
|
$manager->persist($user);
|
||||||
|
|
||||||
$faker = \Faker\Factory::create();
|
$faker = \Faker\Factory::create();
|
||||||
for ($i = 0; $i < 20; ++$i) {
|
for ($i = 0; $i < 20; ++$i) {
|
||||||
$name = $faker->text();
|
$name = $faker->name();
|
||||||
$species = (new Species())
|
$species = (new Species())
|
||||||
->setScientificName($name)
|
->setScientificName($name)
|
||||||
->setVernacularName($name)
|
->setVernacularName($name)
|
||||||
|
@@ -8,6 +8,7 @@ use Doctrine\ORM\Mapping as ORM;
|
|||||||
use Symfony\Component\Validator\Constraints as Assert;
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
#[ORM\Entity(repositoryClass: PostRepository::class)]
|
#[ORM\Entity(repositoryClass: PostRepository::class)]
|
||||||
|
#[ORM\HasLifecycleCallbacks]
|
||||||
class Post
|
class Post
|
||||||
{
|
{
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
@@ -128,4 +129,12 @@ class Post
|
|||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[ORM\PrePersist]
|
||||||
|
public function setPublicationDateValue(): void
|
||||||
|
{
|
||||||
|
if ($this->publicationDate === null) {
|
||||||
|
$this->publicationDate = new \DateTimeImmutable();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -33,6 +33,16 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader
|
|||||||
$this->getEntityManager()->flush();
|
$this->getEntityManager()->flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function findOneByEmail(string $email): ?User
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('u')
|
||||||
|
->andWhere('u.email = :email')
|
||||||
|
->setParameter('email', $email)
|
||||||
|
->getQuery()
|
||||||
|
->getOneOrNullResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * @return User[] Returns an array of User objects
|
// * @return User[] Returns an array of User objects
|
||||||
// */
|
// */
|
||||||
|
@@ -3,8 +3,9 @@
|
|||||||
namespace App\Test\Controller;
|
namespace App\Test\Controller;
|
||||||
|
|
||||||
use App\Entity\Post;
|
use App\Entity\Post;
|
||||||
|
use App\Entity\User;
|
||||||
|
use App\Repository\PostRepository;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
use Doctrine\ORM\EntityRepository;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
|
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||||
|
|
||||||
@@ -12,13 +13,15 @@ class PostControllerTest extends WebTestCase
|
|||||||
{
|
{
|
||||||
private KernelBrowser $client;
|
private KernelBrowser $client;
|
||||||
private EntityManagerInterface $manager;
|
private EntityManagerInterface $manager;
|
||||||
private EntityRepository $repository;
|
private PostRepository $repository;
|
||||||
private string $path = '/post/';
|
private string $path = '/post/';
|
||||||
|
|
||||||
protected function setUp(): void
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
$this->client = static::createClient();
|
$this->client = static::createClient();
|
||||||
$this->manager = static::getContainer()->get('doctrine')->getManager();
|
/** @var EntityManagerInterface $manager */
|
||||||
|
$manager = static::getContainer()->get(EntityManagerInterface::class);
|
||||||
|
$this->manager = $manager;
|
||||||
$this->repository = $this->manager->getRepository(Post::class);
|
$this->repository = $this->manager->getRepository(Post::class);
|
||||||
|
|
||||||
foreach ($this->repository->findAll() as $object) {
|
foreach ($this->repository->findAll() as $object) {
|
||||||
@@ -26,6 +29,12 @@ class PostControllerTest extends WebTestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->manager->flush();
|
$this->manager->flush();
|
||||||
|
|
||||||
|
$userRepository = $this->manager->getRepository(User::class);
|
||||||
|
/** @var User $user */
|
||||||
|
$user = $userRepository->findOneByEmail('test@test.fr');
|
||||||
|
$this->client->loginUser($user);
|
||||||
|
$this->client->request('GET', sprintf('%snew', $this->path));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIndex(): void
|
public function testIndex(): void
|
||||||
@@ -41,35 +50,26 @@ class PostControllerTest extends WebTestCase
|
|||||||
|
|
||||||
public function testNew(): void
|
public function testNew(): void
|
||||||
{
|
{
|
||||||
$this->markTestIncomplete();
|
|
||||||
$this->client->request('GET', sprintf('%snew', $this->path));
|
|
||||||
|
|
||||||
self::assertResponseStatusCodeSame(200);
|
self::assertResponseStatusCodeSame(200);
|
||||||
|
|
||||||
$this->client->submitForm('Save', [
|
$this->client->submitForm('Save', [
|
||||||
'post[foundDate]' => 'Testing',
|
'post[foundDate]' => '2024-01-01 00:00:00',
|
||||||
'post[latitude]' => 'Testing',
|
'post[latitude]' => '45.0',
|
||||||
'post[longitude]' => 'Testing',
|
'post[longitude]' => '45.0',
|
||||||
'post[altitude]' => 'Testing',
|
'post[altitude]' => '500.0',
|
||||||
'post[commentary]' => 'Testing',
|
'post[commentary]' => 'Testing',
|
||||||
'post[species]' => 'Testing',
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
self::assertResponseRedirects($this->path);
|
self::assertResponseRedirects($this->path);
|
||||||
|
|
||||||
self::assertSame(1, $this->repository->count([]));
|
self::assertSame(1, $this->repository->count());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testShow(): void
|
public function testShow(): void
|
||||||
{
|
{
|
||||||
$this->markTestIncomplete();
|
|
||||||
$fixture = new Post();
|
$fixture = new Post();
|
||||||
$fixture->setFoundDate('My Title');
|
$fixture->setFoundDate(new \DateTimeImmutable('2024-01-01 00:00:00'));
|
||||||
$fixture->setLatitude('My Title');
|
$fixture->setCommentary('Cool stuff');
|
||||||
$fixture->setLongitude('My Title');
|
|
||||||
$fixture->setAltitude('My Title');
|
|
||||||
$fixture->setCommentary('My Title');
|
|
||||||
$fixture->setSpecies('My Title');
|
|
||||||
|
|
||||||
$this->manager->persist($fixture);
|
$this->manager->persist($fixture);
|
||||||
$this->manager->flush();
|
$this->manager->flush();
|
||||||
@@ -77,21 +77,14 @@ class PostControllerTest extends WebTestCase
|
|||||||
$this->client->request('GET', sprintf('%s%s', $this->path, $fixture->getId()));
|
$this->client->request('GET', sprintf('%s%s', $this->path, $fixture->getId()));
|
||||||
|
|
||||||
self::assertResponseStatusCodeSame(200);
|
self::assertResponseStatusCodeSame(200);
|
||||||
self::assertPageTitleContains('Post');
|
self::assertSelectorTextContains('h1', 'Post');
|
||||||
|
|
||||||
// Use assertions to check that the properties are properly displayed.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testEdit(): void
|
public function testEdit(): void
|
||||||
{
|
{
|
||||||
$this->markTestIncomplete();
|
|
||||||
$fixture = new Post();
|
$fixture = new Post();
|
||||||
$fixture->setFoundDate('Value');
|
$fixture->setFoundDate(new \DateTimeImmutable('2024-01-01 00:00:00'));
|
||||||
$fixture->setLatitude('Value');
|
$fixture->setCommentary('Cool stuff');
|
||||||
$fixture->setLongitude('Value');
|
|
||||||
$fixture->setAltitude('Value');
|
|
||||||
$fixture->setCommentary('Value');
|
|
||||||
$fixture->setSpecies('Value');
|
|
||||||
|
|
||||||
$this->manager->persist($fixture);
|
$this->manager->persist($fixture);
|
||||||
$this->manager->flush();
|
$this->manager->flush();
|
||||||
@@ -99,36 +92,29 @@ class PostControllerTest extends WebTestCase
|
|||||||
$this->client->request('GET', sprintf('%s%s/edit', $this->path, $fixture->getId()));
|
$this->client->request('GET', sprintf('%s%s/edit', $this->path, $fixture->getId()));
|
||||||
|
|
||||||
$this->client->submitForm('Update', [
|
$this->client->submitForm('Update', [
|
||||||
'post[foundDate]' => 'Something New',
|
'post[foundDate]' => '2024-03-25 00:00:00',
|
||||||
'post[latitude]' => 'Something New',
|
'post[latitude]' => '90',
|
||||||
'post[longitude]' => 'Something New',
|
'post[longitude]' => '90',
|
||||||
'post[altitude]' => 'Something New',
|
'post[altitude]' => '200',
|
||||||
'post[commentary]' => 'Something New',
|
'post[commentary]' => 'Something New',
|
||||||
'post[species]' => 'Something New',
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
self::assertResponseRedirects('/post/');
|
self::assertResponseRedirects('/post/');
|
||||||
|
|
||||||
$fixture = $this->repository->findAll();
|
$fixture = $this->repository->findAll();
|
||||||
|
|
||||||
self::assertSame('Something New', $fixture[0]->getFoundDate());
|
self::assertEquals(new \DateTimeImmutable('2024-03-25 00:00:00'), $fixture[0]->getFoundDate());
|
||||||
self::assertSame('Something New', $fixture[0]->getLatitude());
|
self::assertSame(90., $fixture[0]->getLatitude());
|
||||||
self::assertSame('Something New', $fixture[0]->getLongitude());
|
self::assertSame(90., $fixture[0]->getLongitude());
|
||||||
self::assertSame('Something New', $fixture[0]->getAltitude());
|
self::assertSame(200., $fixture[0]->getAltitude());
|
||||||
self::assertSame('Something New', $fixture[0]->getCommentary());
|
self::assertSame('Something New', $fixture[0]->getCommentary());
|
||||||
self::assertSame('Something New', $fixture[0]->getSpecies());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRemove(): void
|
public function testRemove(): void
|
||||||
{
|
{
|
||||||
$this->markTestIncomplete();
|
|
||||||
$fixture = new Post();
|
$fixture = new Post();
|
||||||
$fixture->setFoundDate('Value');
|
$fixture->setFoundDate(new \DateTimeImmutable('2024-01-01 00:00:00'));
|
||||||
$fixture->setLatitude('Value');
|
$fixture->setCommentary('Cool stuff');
|
||||||
$fixture->setLongitude('Value');
|
|
||||||
$fixture->setAltitude('Value');
|
|
||||||
$fixture->setCommentary('Value');
|
|
||||||
$fixture->setSpecies('Value');
|
|
||||||
|
|
||||||
$this->manager->persist($fixture);
|
$this->manager->persist($fixture);
|
||||||
$this->manager->flush();
|
$this->manager->flush();
|
||||||
@@ -137,6 +123,6 @@ class PostControllerTest extends WebTestCase
|
|||||||
$this->client->submitForm('Delete');
|
$this->client->submitForm('Delete');
|
||||||
|
|
||||||
self::assertResponseRedirects('/post/');
|
self::assertResponseRedirects('/post/');
|
||||||
self::assertSame(0, $this->repository->count([]));
|
self::assertSame(0, $this->repository->count());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3,8 +3,9 @@
|
|||||||
namespace App\Test\Controller;
|
namespace App\Test\Controller;
|
||||||
|
|
||||||
use App\Entity\Species;
|
use App\Entity\Species;
|
||||||
|
use App\Entity\User;
|
||||||
|
use App\Repository\SpeciesRepository;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
use Doctrine\ORM\EntityRepository;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
|
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||||
|
|
||||||
@@ -12,13 +13,15 @@ class SpeciesControllerTest extends WebTestCase
|
|||||||
{
|
{
|
||||||
private KernelBrowser $client;
|
private KernelBrowser $client;
|
||||||
private EntityManagerInterface $manager;
|
private EntityManagerInterface $manager;
|
||||||
private EntityRepository $repository;
|
private SpeciesRepository $repository;
|
||||||
private string $path = '/species/';
|
private string $path = '/species/';
|
||||||
|
|
||||||
protected function setUp(): void
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
$this->client = static::createClient();
|
$this->client = static::createClient();
|
||||||
$this->manager = static::getContainer()->get('doctrine')->getManager();
|
/** @var EntityManagerInterface $manager */
|
||||||
|
$manager = static::getContainer()->get(EntityManagerInterface::class);
|
||||||
|
$this->manager = $manager;
|
||||||
$this->repository = $this->manager->getRepository(Species::class);
|
$this->repository = $this->manager->getRepository(Species::class);
|
||||||
|
|
||||||
foreach ($this->repository->findAll() as $object) {
|
foreach ($this->repository->findAll() as $object) {
|
||||||
@@ -26,6 +29,12 @@ class SpeciesControllerTest extends WebTestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->manager->flush();
|
$this->manager->flush();
|
||||||
|
|
||||||
|
$userRepository = $this->manager->getRepository(User::class);
|
||||||
|
/** @var User $user */
|
||||||
|
$user = $userRepository->findOneByEmail('test@test.fr');
|
||||||
|
$this->client->loginUser($user);
|
||||||
|
$this->client->request('GET', sprintf('%snew', $this->path));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIndex(): void
|
public function testIndex(): void
|
||||||
@@ -41,7 +50,6 @@ class SpeciesControllerTest extends WebTestCase
|
|||||||
|
|
||||||
public function testNew(): void
|
public function testNew(): void
|
||||||
{
|
{
|
||||||
$this->markTestIncomplete();
|
|
||||||
$this->client->request('GET', sprintf('%snew', $this->path));
|
$this->client->request('GET', sprintf('%snew', $this->path));
|
||||||
|
|
||||||
self::assertResponseStatusCodeSame(200);
|
self::assertResponseStatusCodeSame(200);
|
||||||
@@ -59,10 +67,9 @@ class SpeciesControllerTest extends WebTestCase
|
|||||||
|
|
||||||
public function testShow(): void
|
public function testShow(): void
|
||||||
{
|
{
|
||||||
$this->markTestIncomplete();
|
|
||||||
$fixture = new Species();
|
$fixture = new Species();
|
||||||
$fixture->setScientific_name('My Title');
|
$fixture->setScientificName('My Title');
|
||||||
$fixture->setVernacular_name('My Title');
|
$fixture->setVernacularName('My Title');
|
||||||
$fixture->setRegion('My Title');
|
$fixture->setRegion('My Title');
|
||||||
|
|
||||||
$this->manager->persist($fixture);
|
$this->manager->persist($fixture);
|
||||||
@@ -78,10 +85,9 @@ class SpeciesControllerTest extends WebTestCase
|
|||||||
|
|
||||||
public function testEdit(): void
|
public function testEdit(): void
|
||||||
{
|
{
|
||||||
$this->markTestIncomplete();
|
|
||||||
$fixture = new Species();
|
$fixture = new Species();
|
||||||
$fixture->setScientific_name('Value');
|
$fixture->setScientificName('Value');
|
||||||
$fixture->setVernacular_name('Value');
|
$fixture->setVernacularName('Value');
|
||||||
$fixture->setRegion('Value');
|
$fixture->setRegion('Value');
|
||||||
|
|
||||||
$this->manager->persist($fixture);
|
$this->manager->persist($fixture);
|
||||||
@@ -99,17 +105,16 @@ class SpeciesControllerTest extends WebTestCase
|
|||||||
|
|
||||||
$fixture = $this->repository->findAll();
|
$fixture = $this->repository->findAll();
|
||||||
|
|
||||||
self::assertSame('Something New', $fixture[0]->getScientific_name());
|
self::assertSame('Something New', $fixture[0]->getScientificName());
|
||||||
self::assertSame('Something New', $fixture[0]->getVernacular_name());
|
self::assertSame('Something New', $fixture[0]->getVernacularName());
|
||||||
self::assertSame('Something New', $fixture[0]->getRegion());
|
self::assertSame('Something New', $fixture[0]->getRegion());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRemove(): void
|
public function testRemove(): void
|
||||||
{
|
{
|
||||||
$this->markTestIncomplete();
|
|
||||||
$fixture = new Species();
|
$fixture = new Species();
|
||||||
$fixture->setScientific_name('Value');
|
$fixture->setScientificName('Value');
|
||||||
$fixture->setVernacular_name('Value');
|
$fixture->setVernacularName('Value');
|
||||||
$fixture->setRegion('Value');
|
$fixture->setRegion('Value');
|
||||||
|
|
||||||
$this->manager->persist($fixture);
|
$this->manager->persist($fixture);
|
||||||
|
Reference in New Issue
Block a user