Skip to content

Instantly share code, notes, and snippets.

@makasim
Created August 16, 2011 12:30
Show Gist options
  • Select an option

  • Save makasim/1148960 to your computer and use it in GitHub Desktop.

Select an option

Save makasim/1148960 to your computer and use it in GitHub Desktop.
Doctrine2 validate schema test
<?php
<?php
namespace Foo\PaymentBundle\Tests\Database;
use Doctrine\ORM\Tools\SchemaValidator;
class ValidateSchemaTest extends BaseDatabaseTest
{
/**
*
* @test
*/
public function shouldValidateSchemaWithoutErrors()
{
$validator = new SchemaValidator($this->em());
$errors = $validator->validateMapping();
$this->assertEmpty($errors, "Validation errors found: \n\n".var_export($errors, true));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment