public function testAddGetCustomStringFunction() { $this->configuration->addCustomStringFunction('FunctionName', __CLASS__); $this->assertSame(__CLASS__, $this->configuration->getCustomStringFunction('FunctionName')); $this->assertSame(null, $this->configuration->getCustomStringFunction('NonExistingFunction')); $this->configuration->setCustomStringFunctions(array('OtherFunctionName' => __CLASS__)); $this->assertSame(__CLASS__, $this->configuration->getCustomStringFunction('OtherFunctionName')); $this->setExpectedException('Doctrine\\ORM\\ORMException'); $this->configuration->addCustomStringFunction('concat', __CLASS__); }