mirror of
https://github.com/archtechx/virtualcolumn.git
synced 2025-12-12 12:14:03 +00:00
Rename generateColumnName
This commit is contained in:
parent
5881f13b81
commit
73d7918170
2 changed files with 3 additions and 3 deletions
|
|
@ -140,7 +140,7 @@ trait VirtualColumn
|
|||
];
|
||||
}
|
||||
|
||||
public function generateColumnName(string $column): string
|
||||
public function getColumnForQuery(string $column): string
|
||||
{
|
||||
if (in_array($column, static::getCustomColumns())) {
|
||||
return $column;
|
||||
|
|
|
|||
|
|
@ -101,8 +101,8 @@ class VirtualColumnTest extends TestCase
|
|||
'foo' => $virtualColumnName
|
||||
]);
|
||||
|
||||
$this->assertSame($customColumnName, $model->generateColumnName('custom1'));
|
||||
$this->assertSame($virtualColumnName, $model->generateColumnName('foo'));
|
||||
$this->assertSame($customColumnName, $model->getColumnForQuery('custom1'));
|
||||
$this->assertSame($virtualColumnName, $model->getColumnForQuery('foo'));
|
||||
}
|
||||
|
||||
// maybe add an explicit test that the saving() and updating() listeners don't run twice?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue