Fixed broken test

This commit is contained in:
vladar 2016-10-22 17:28:24 +07:00
parent 276a58f6d1
commit f443c6b1ba

View File

@ -457,6 +457,7 @@ class DefinitionTest extends \PHPUnit_Framework_TestCase
$this->inputObjectType $this->inputObjectType
]; ];
// TODO: extract config validation to separate test
Config::enableValidation(); Config::enableValidation();
foreach ($badUnionTypes as $type) { foreach ($badUnionTypes as $type) {
try { try {
@ -464,7 +465,7 @@ class DefinitionTest extends \PHPUnit_Framework_TestCase
$this->fail('Expected exception not thrown'); $this->fail('Expected exception not thrown');
} catch (\Exception $e) { } catch (\Exception $e) {
$this->assertSame( $this->assertSame(
'Error in "BadUnion" type definition: expecting callable or instance of GraphQL\Type\Definition\ObjectType at "types:0", but got "' . Utils::getVariableType($type) . '"', 'Error in "BadUnion" type definition: expecting callable or ObjectType definition at "types:0", but got "' . Utils::getVariableType($type) . '"',
$e->getMessage() $e->getMessage()
); );
} }