2017 © Pedro PelĂĄez
 

project entity

Doctrine entity tests against real SQL persistence

image

doctrineum/entity

Doctrine entity tests against real SQL persistence

  • Wednesday, July 18, 2018
  • by jaroslavtyc
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2,593 Installations
  • PHP
  • 13 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 5 % Grown

The README.md

You can't be sure if it can be used, until you use it., (*1)

But how to test entities by usage automatically?, (*2)

  • by fixtures.

But fot that I need to set database. What if it is just a library for include, without a database? - then use this test framework, (*3)

Real Doctrine-by SQL persistence, real Doctrine-by SQL fetch., (*4)

<?php
namespace MyLibraryWithDoctrineEntities\Tests;

use Doctrine\ORM\EntityManager;
use Doctrineum\Tests\Entity\AbstractDoctrineEntitiesTest;
use MyLibraryWithDoctrineEntities\Entities\SomeEntity;

class PositiveTestOfAbstractDoctrineEntitiesTest extends AbstractDoctrineEntitiesTest
{
    protected function getDirsWithEntities()
    {
        return [
            __DIR__ . '/../Entities'
        ];
    }

    protected function getExpectedEntityClasses()
    {
        return [
            SomeEntity::class,
        ];
    }

    protected function createEntitiesToPersist()
    {
        return [
            new SomeEntity(),
        ];
    }

    protected function fetchEntitiesByOriginals(array $originalEntities, EntityManager $entityManager)
    {
        $original = current($originalEntities);
        $repository = $entityManager->getRepository(SomeValidEntity::class);
        $fetched = $repository->find($original->getId());

        return [
            $fetched
        ];
    }

}

The Versions

18/07 2018

dev-master

9999999-dev https://github.com/jaroslavtyc/doctrineum-entity

Doctrine entity tests against real SQL persistence

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

test php doctrine entity object

18/07 2018

2.1.x-dev

2.1.9999999.9999999-dev https://github.com/jaroslavtyc/doctrineum-entity

Doctrine entity tests against real SQL persistence

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

test php doctrine entity object

18/07 2018

2.1.0

2.1.0.0 https://github.com/jaroslavtyc/doctrineum-entity

Doctrine entity tests against real SQL persistence

  Sources   Download

MIT

The Requires

  • php >=7.1

 

The Development Requires

test php doctrine entity object

19/02 2017

2.0.x-dev

2.0.9999999.9999999-dev https://github.com/jaroslavtyc/doctrineum-entity

Doctrine entity tests against real SQL persistence

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

test php doctrine entity object

19/02 2017

2.0.1

2.0.1.0 https://github.com/jaroslavtyc/doctrineum-entity

Doctrine entity tests against real SQL persistence

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

test php doctrine entity object

19/02 2017

2.0.0

2.0.0.0 https://github.com/jaroslavtyc/doctrineum-entity

Doctrine entity tests against real SQL persistence

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

test php doctrine entity object

19/02 2017

1.0.x-dev

1.0.9999999.9999999-dev https://github.com/jaroslavtyc/doctrineum-entity

Doctrine entity tests against real SQL persistence

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

test php doctrine entity object

19/02 2017

1.0.0

1.0.0.0 https://github.com/jaroslavtyc/doctrineum-entity

Doctrine entity tests against real SQL persistence

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

test php doctrine entity object