Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use short Model name everywhere #805

Merged
merged 1 commit into from
Dec 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/BusinessModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
use Atk4\Data\Field;
use Atk4\Data\Model;
use Atk4\Data\Persistence;
use Atk4\Data\Tests\Model\Client as Client;
use Atk4\Data\Tests\Model\User as User;
use Atk4\Data\Tests\Model\Client;
use Atk4\Data\Tests\Model\User;

/**
* @coversDefaultClass \Atk4\Data\Model
Expand Down
3 changes: 2 additions & 1 deletion tests/FolderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

namespace Atk4\Data\Tests;

use Atk4\Data\Model;
use Atk4\Data\Persistence;

class Folder extends \Atk4\Data\Model
class Folder extends Model
{
public $table = 'folder';

Expand Down
4 changes: 3 additions & 1 deletion tests/Model/Smbo/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

namespace Atk4\Data\Tests\Model\Smbo;

class Account extends \Atk4\Data\Model
use Atk4\Data\Model;

class Account extends Model
{
public $table = 'account';

Expand Down
4 changes: 3 additions & 1 deletion tests/Model/Smbo/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

namespace Atk4\Data\Tests\Model\Smbo;

class Contact extends \Atk4\Data\Model
use Atk4\Data\Model;

class Contact extends Model
{
public $table = 'contact';

Expand Down
4 changes: 3 additions & 1 deletion tests/Model/Smbo/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

namespace Atk4\Data\Tests\Model\Smbo;

class Document extends \Atk4\Data\Model
use Atk4\Data\Model;

class Document extends Model
{
public $table = 'document';

Expand Down
10 changes: 5 additions & 5 deletions tests/RandomTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Atk4\Data\Model;
use Atk4\Data\Persistence;

class Model_Rate extends \Atk4\Data\Model
class Model_Rate extends Model
{
public $table = 'rate';

Expand All @@ -20,7 +20,7 @@ protected function init(): void
$this->addField('ask');
}
}
class Model_Item extends \Atk4\Data\Model
class Model_Item extends Model
{
public $table = 'item';

Expand All @@ -32,7 +32,7 @@ protected function init(): void
->addTitle();
}
}
class Model_Item2 extends \Atk4\Data\Model
class Model_Item2 extends Model
{
public $table = 'item';

Expand All @@ -45,7 +45,7 @@ protected function init(): void
->addTitle();
}
}
class Model_Item3 extends \Atk4\Data\Model
class Model_Item3 extends Model
{
public $table = 'item';

Expand Down Expand Up @@ -357,7 +357,7 @@ public function testModelCaption()
$db = new Persistence\Sql($this->db->connection);
$m = new Model($db, 'user');

// caption is not set, so generate it from class name \Atk4\Data\Model
// caption is not set, so generate it from class name Model
$this->assertSame('Atk 4 Data Model', $m->getModelCaption());

// caption is set
Expand Down
1 change: 1 addition & 0 deletions tests/UserActionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public function backup_clients()
class UaClient extends Model
{
use UaReminder;

public $caption = 'UaClient';

protected function init(): void
Expand Down