public function throwsWhenTryingToDefineEntitiesThatAreNotEntities() { $this->assertTrue(class_exists('FactoryGirl\\Tests\\Provider\\Doctrine\\Fixtures\\TestEntity\\NotAnEntity', true)); $self = $this; $this->assertThrows(function () use($self) { $self->factory->defineEntity('NotAnEntity'); }); }