#DDC-1590: Simple Fixes
This commit is contained in:
parent
4e805bb59a
commit
94ba6e2dfc
3 changed files with 3 additions and 61 deletions
|
@ -20,11 +20,6 @@ abstract class DDC1590Entity
|
||||||
*/
|
*/
|
||||||
protected $created_at;
|
protected $created_at;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Column(type="datetime")
|
|
||||||
*/
|
|
||||||
protected $updated_at;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id
|
* Get id
|
||||||
*
|
*
|
||||||
|
@ -58,28 +53,4 @@ abstract class DDC1590Entity
|
||||||
{
|
{
|
||||||
return $this->created_at;
|
return $this->created_at;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set updatedAt
|
|
||||||
*
|
|
||||||
* @param \DateTime $updatedAt
|
|
||||||
*
|
|
||||||
* @return DDC1590User
|
|
||||||
*/
|
|
||||||
public function setUpdatedAt($updatedAt)
|
|
||||||
{
|
|
||||||
$this->updated_at = $updatedAt;
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get updatedAt
|
|
||||||
*
|
|
||||||
* @return \DateTime
|
|
||||||
*/
|
|
||||||
public function getUpdatedAt()
|
|
||||||
{
|
|
||||||
return $this->updated_at;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,27 +15,4 @@ class DDC1590User extends DDC1590Entity
|
||||||
*/
|
*/
|
||||||
protected $name;
|
protected $name;
|
||||||
|
|
||||||
/**
|
|
||||||
* Set name
|
|
||||||
*
|
|
||||||
* @param string $name
|
|
||||||
*
|
|
||||||
* @return DDC1590User
|
|
||||||
*/
|
|
||||||
public function setName($name)
|
|
||||||
{
|
|
||||||
$this->name = $name;
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get name
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getName()
|
|
||||||
{
|
|
||||||
return $this->name;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -562,7 +562,7 @@ class EntityGeneratorTest extends \Doctrine\Tests\OrmTestCase
|
||||||
|
|
||||||
$content = str_replace(
|
$content = str_replace(
|
||||||
'namespace Doctrine\Tests\Models\DDC1590',
|
'namespace Doctrine\Tests\Models\DDC1590',
|
||||||
'namespace '.$ns,
|
'namespace ' . $ns,
|
||||||
file_get_contents(__DIR__ . '/../../Models/DDC1590/DDC1590User.php')
|
file_get_contents(__DIR__ . '/../../Models/DDC1590/DDC1590User.php')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -579,13 +579,13 @@ class EntityGeneratorTest extends \Doctrine\Tests\OrmTestCase
|
||||||
|
|
||||||
// class _DDC1590User extends DDC1590Entity { ... }
|
// class _DDC1590User extends DDC1590Entity { ... }
|
||||||
$source2 = str_replace('class DDC1590User', 'class _DDC1590User', $source);
|
$source2 = str_replace('class DDC1590User', 'class _DDC1590User', $source);
|
||||||
$fname2 = $fname = $nsdir . "/_DDC1590User.php";
|
$fname2 = $nsdir . "/_DDC1590User.php";
|
||||||
file_put_contents($fname2, $source2);
|
file_put_contents($fname2, $source2);
|
||||||
require $fname2;
|
require $fname2;
|
||||||
|
|
||||||
// class __DDC1590User { ... }
|
// class __DDC1590User { ... }
|
||||||
$source3 = str_replace('class DDC1590User extends DDC1590Entity', 'class __DDC1590User', $source);
|
$source3 = str_replace('class DDC1590User extends DDC1590Entity', 'class __DDC1590User', $source);
|
||||||
$fname3 = $fname = $nsdir . "/__DDC1590User.php";
|
$fname3 = $nsdir . "/__DDC1590User.php";
|
||||||
file_put_contents($fname3, $source3);
|
file_put_contents($fname3, $source3);
|
||||||
require $fname3;
|
require $fname3;
|
||||||
|
|
||||||
|
@ -596,7 +596,6 @@ class EntityGeneratorTest extends \Doctrine\Tests\OrmTestCase
|
||||||
$this->assertSame($rc2->hasProperty('name'), true);
|
$this->assertSame($rc2->hasProperty('name'), true);
|
||||||
$this->assertSame($rc2->hasProperty('id'), true);
|
$this->assertSame($rc2->hasProperty('id'), true);
|
||||||
$this->assertSame($rc2->hasProperty('created_at'), true);
|
$this->assertSame($rc2->hasProperty('created_at'), true);
|
||||||
$this->assertSame($rc2->hasProperty('updated_at'), true);
|
|
||||||
|
|
||||||
$this->assertSame($rc2->hasMethod('getName'), true);
|
$this->assertSame($rc2->hasMethod('getName'), true);
|
||||||
$this->assertSame($rc2->hasMethod('setName'), true);
|
$this->assertSame($rc2->hasMethod('setName'), true);
|
||||||
|
@ -604,8 +603,6 @@ class EntityGeneratorTest extends \Doctrine\Tests\OrmTestCase
|
||||||
$this->assertSame($rc2->hasMethod('setId'), false);
|
$this->assertSame($rc2->hasMethod('setId'), false);
|
||||||
$this->assertSame($rc2->hasMethod('getCreatedAt'), true);
|
$this->assertSame($rc2->hasMethod('getCreatedAt'), true);
|
||||||
$this->assertSame($rc2->hasMethod('setCreatedAt'), true);
|
$this->assertSame($rc2->hasMethod('setCreatedAt'), true);
|
||||||
$this->assertSame($rc2->hasMethod('getUpdatedAt'), true);
|
|
||||||
$this->assertSame($rc2->hasMethod('setUpdatedAt'), true);
|
|
||||||
|
|
||||||
|
|
||||||
// class __DDC1590User { ... }
|
// class __DDC1590User { ... }
|
||||||
|
@ -614,7 +611,6 @@ class EntityGeneratorTest extends \Doctrine\Tests\OrmTestCase
|
||||||
$this->assertSame($rc3->hasProperty('name'), true);
|
$this->assertSame($rc3->hasProperty('name'), true);
|
||||||
$this->assertSame($rc3->hasProperty('id'), false);
|
$this->assertSame($rc3->hasProperty('id'), false);
|
||||||
$this->assertSame($rc3->hasProperty('created_at'), false);
|
$this->assertSame($rc3->hasProperty('created_at'), false);
|
||||||
$this->assertSame($rc3->hasProperty('updated_at'), false);
|
|
||||||
|
|
||||||
$this->assertSame($rc3->hasMethod('getName'), true);
|
$this->assertSame($rc3->hasMethod('getName'), true);
|
||||||
$this->assertSame($rc3->hasMethod('setName'), true);
|
$this->assertSame($rc3->hasMethod('setName'), true);
|
||||||
|
@ -622,8 +618,6 @@ class EntityGeneratorTest extends \Doctrine\Tests\OrmTestCase
|
||||||
$this->assertSame($rc3->hasMethod('setId'), false);
|
$this->assertSame($rc3->hasMethod('setId'), false);
|
||||||
$this->assertSame($rc3->hasMethod('getCreatedAt'), false);
|
$this->assertSame($rc3->hasMethod('getCreatedAt'), false);
|
||||||
$this->assertSame($rc3->hasMethod('setCreatedAt'), false);
|
$this->assertSame($rc3->hasMethod('setCreatedAt'), false);
|
||||||
$this->assertSame($rc3->hasMethod('getUpdatedAt'), false);
|
|
||||||
$this->assertSame($rc3->hasMethod('setUpdatedAt'), false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue