Skip to content

Commit

Permalink
Revert "Improve code on loadMetadata() to verify if class exists, avo…
Browse files Browse the repository at this point in the history
…id a later warning when calling class_parents()"

This reverts commit 68a40cc.
  • Loading branch information
beberlei committed May 9, 2013
1 parent 15617af commit 0e6226f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
Expand Up @@ -272,12 +272,6 @@ protected function getParentClasses($name)
*/
protected function loadMetadata($name)
{
if (!class_exists($name)) {
throw new \RuntimeException(
sprintf('Failed to load metadata for class "%s" because class does not exists.', $name)
);
}

if ( ! $this->initialized) {
$this->initialize();
}
Expand Down
Expand Up @@ -39,14 +39,6 @@ public function testGetMetadataFor()
$this->assertTrue($this->cmf->hasMetadataFor('stdClass'));
}

/**
* @expectedException \RuntimeException
*/
public function testGetMetadataForAbsentClass()
{
$this->cmf->getMetadataFor(__NAMESPACE__ . '\AbsentClass');
}

public function testGetParentMetadata()
{
$metadata = $this->cmf->getMetadataFor(__NAMESPACE__ . '\ChildEntity');
Expand Down

0 comments on commit 0e6226f

Please sign in to comment.