#1252 DDC-3496 - moving stub naming strategy to tests directory
This commit is contained in:
parent
29007e7d79
commit
369a9934a5
2 changed files with 8 additions and 9 deletions
|
@ -18,15 +18,12 @@
|
||||||
* <http://www.doctrine-project.org>.
|
* <http://www.doctrine-project.org>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Doctrine\ORM\Mapping;
|
namespace Doctrine\Tests\ORM\Mapping\NamingStrategy;
|
||||||
|
|
||||||
|
use Doctrine\ORM\Mapping\DefaultNamingStrategy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default NamingStrategy
|
* Stub naming strategy to verify `joinColumnName` proper behavior
|
||||||
*
|
|
||||||
*
|
|
||||||
* @link www.doctrine-project.org
|
|
||||||
* @since 2.3
|
|
||||||
* @author Fabio B. Silva <fabio.bat.silva@gmail.com>
|
|
||||||
*/
|
*/
|
||||||
class JoinColumnClassNamingStrategy extends DefaultNamingStrategy
|
class JoinColumnClassNamingStrategy extends DefaultNamingStrategy
|
||||||
{
|
{
|
||||||
|
@ -35,6 +32,8 @@ class JoinColumnClassNamingStrategy extends DefaultNamingStrategy
|
||||||
*/
|
*/
|
||||||
public function joinColumnName($propertyName, $className = null)
|
public function joinColumnName($propertyName, $className = null)
|
||||||
{
|
{
|
||||||
return strtolower($this->classToTableName($className)) . '_' . $propertyName . '_' . $this->referenceColumnName();
|
return strtolower($this->classToTableName($className))
|
||||||
|
. '_' . $propertyName
|
||||||
|
. '_' . $this->referenceColumnName();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -4,8 +4,8 @@ namespace Doctrine\Tests\ORM\Mapping;
|
||||||
|
|
||||||
use Doctrine\ORM\Mapping\UnderscoreNamingStrategy;
|
use Doctrine\ORM\Mapping\UnderscoreNamingStrategy;
|
||||||
use Doctrine\ORM\Mapping\DefaultNamingStrategy;
|
use Doctrine\ORM\Mapping\DefaultNamingStrategy;
|
||||||
use Doctrine\ORM\Mapping\JoinColumnClassNamingStrategy;
|
|
||||||
use Doctrine\ORM\Mapping\NamingStrategy;
|
use Doctrine\ORM\Mapping\NamingStrategy;
|
||||||
|
use Doctrine\Tests\ORM\Mapping\NamingStrategy\JoinColumnClassNamingStrategy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @group DDC-559
|
* @group DDC-559
|
||||||
|
|
Loading…
Add table
Reference in a new issue