Initial testing code. Must prove Datetime works.

This commit is contained in:
Greyscale 2020-08-24 20:11:43 +02:00
parent cb532fbd9d
commit 7f8f20151b
15 changed files with 158 additions and 122 deletions

View file

@ -22,6 +22,9 @@
</php> </php>
<testsuites> <testsuites>
<testsuite name="Human">
<file>test/app/tests/Models/DateTimeFieldsTest.php</file>
</testsuite>
<testsuite name="Models"> <testsuite name="Models">
<directory>test/app/tests/Models</directory> <directory>test/app/tests/Models</directory>
</testsuite> </testsuite>

View file

@ -63,9 +63,9 @@ abstract class Model implements ModelInterface, \Serializable
foreach ($this->getListOfProperties() as $dbField => $property) { foreach ($this->getListOfProperties() as $dbField => $property) {
$currentValue = $this->{$property}; $currentValue = $this->{$property};
if($currentValue instanceof \DateTime){ if ($currentValue instanceof \DateTime) {
$array[$dbField] = $currentValue->format("Y-m-d H:i:s"); $array[$dbField] = $currentValue->format('Y-m-d H:i:s');
}else { } else {
$array[$dbField] = $currentValue; $array[$dbField] = $currentValue;
} }
} }

View file

@ -50,20 +50,22 @@ abstract class BaseBlogPostsModel extends AbstractModel implements ModelInterfac
'blogPostId' => 'blogPostId', 'blogPostId' => 'blogPostId',
]; ];
// PHPType: int. DBType: int. Max Length: 2147483647. // PHPType: int. DBType: int.
// Max Length: 2147483647.
protected ?int $blogPostId = null; protected ?int $blogPostId = null;
// PHPType: string. DBType: varchar. Max Length: . // PHPType: string. DBType: varchar.
protected ?string $title = null; protected ?string $title = null;
// PHPType: string. DBType: text. Max Length: . // PHPType: string. DBType: text.
protected ?string $description = null; protected ?string $description = null;
// PHPType: int. DBType: int. Max Length: 2147483647. // PHPType: int. DBType: int.
// Max Length: 2147483647.
protected ?int $userId = null; protected ?int $userId = null;
// PHPType: string. DBType: timestamp. Max Length: . // PHPType: \DateTime. DBType: timestamp.
protected ?string $created = null; protected ?\DateTime $created = null;
private Services\UsersService $usersService; private Services\UsersService $usersService;
@ -104,7 +106,9 @@ abstract class BaseBlogPostsModel extends AbstractModel implements ModelInterfac
*/ */
public function getPropertyMeta(): array public function getPropertyMeta(): array
{ {
$usersService = App::DI(Services\BlogPostsService::class); /** @var Services\UsersService $usersService */
$usersService = App::DI(Services\UsersService::class);
return [ return [
self::FIELD_BLOGPOSTID => [ self::FIELD_BLOGPOSTID => [
'type' => self::TYPE_BLOGPOSTID, 'type' => self::TYPE_BLOGPOSTID,
@ -119,7 +123,10 @@ abstract class BaseBlogPostsModel extends AbstractModel implements ModelInterfac
], ],
self::FIELD_USERID => [ self::FIELD_USERID => [
'type' => self::TYPE_USERID, 'type' => self::TYPE_USERID,
'remoteOptionsLoader' => $usersService->getAll(), 'service' => $usersService,
'remoteOptionsLoader' => function() use ($usersService){
return $usersService->getAll();
},
], ],
self::FIELD_CREATED => [ self::FIELD_CREATED => [
'type' => self::TYPE_CREATED, 'type' => self::TYPE_CREATED,
@ -133,7 +140,7 @@ abstract class BaseBlogPostsModel extends AbstractModel implements ModelInterfac
} }
/** /**
* @param int $blogPostId * @param int|null $blogPostId
* *
* @return self * @return self
*/ */
@ -150,7 +157,7 @@ abstract class BaseBlogPostsModel extends AbstractModel implements ModelInterfac
} }
/** /**
* @param string $title * @param string|null $title
* *
* @return self * @return self
*/ */
@ -167,7 +174,7 @@ abstract class BaseBlogPostsModel extends AbstractModel implements ModelInterfac
} }
/** /**
* @param string $description * @param string|null $description
* *
* @return self * @return self
*/ */
@ -184,7 +191,7 @@ abstract class BaseBlogPostsModel extends AbstractModel implements ModelInterfac
} }
/** /**
* @param int $userId * @param int|null $userId
* *
* @return self * @return self
*/ */
@ -195,17 +202,17 @@ abstract class BaseBlogPostsModel extends AbstractModel implements ModelInterfac
return $this; return $this;
} }
public function getCreated(): ?string public function getCreated(): ?\DateTime
{ {
return $this->created; return $this->created;
} }
/** /**
* @param string $created * @param \DateTime|null $created
* *
* @return self * @return self
*/ */
public function setCreated(string $created = null): self public function setCreated(\DateTime $created = null): self
{ {
$this->created = $created; $this->created = $created;
@ -283,33 +290,19 @@ abstract class BaseBlogPostsModel extends AbstractModel implements ModelInterfac
/** /**
* Take an input array $data, and turn that array into a hydrated object. * Take an input array $data, and turn that array into a hydrated object.
* *
* This has been re-written to be as permissive as possible with loading in data. This at some point will need to
* be re-re-written as a less messy solution (ie: picking one input field style and sticking with it)
*
* @todo re-rewrite this: pick one input field style and stick with it
*
* @param array $data dehydated object array * @param array $data dehydated object array
* *
* @return Models\BlogPostsModel * @return Models\BlogPostsModel
*/ */
public function exchangeArray(array $data): self public function exchangeArray(array $data): self
{ {
if (isset($data['blogPostId'])) $this->setBlogPostId($data['blogPostId']); return $this
if (isset($data['blogPostId'])) $this->setBlogPostId($data['blogPostId']); ->setBlogPostId($data['blogPostId'] ?? $data['BlogPostId'])
if (isset($data['BlogPostId'])) $this->setBlogPostId($data['BlogPostId']); ->setTitle($data['title'] ?? $data['Title'])
if (isset($data['title'])) $this->setTitle($data['title']); ->setDescription($data['description'] ?? $data['Description'])
if (isset($data['title'])) $this->setTitle($data['title']); ->setUserId($data['userId'] ?? $data['UserId'])
if (isset($data['Title'])) $this->setTitle($data['Title']); ->setCreated(\DateTime::createFromFormat("Y-m-d H:i:s", $data['created'] ?? $data['Created']))
if (isset($data['description'])) $this->setDescription($data['description']); ;
if (isset($data['description'])) $this->setDescription($data['description']);
if (isset($data['Description'])) $this->setDescription($data['Description']);
if (isset($data['userId'])) $this->setUserId($data['userId']);
if (isset($data['userId'])) $this->setUserId($data['userId']);
if (isset($data['UserId'])) $this->setUserId($data['UserId']);
if (isset($data['created'])) $this->setCreated($data['created']);
if (isset($data['created'])) $this->setCreated($data['created']);
if (isset($data['Created'])) $this->setCreated($data['Created']);
return $this;
} }
} }

View file

@ -46,19 +46,21 @@ abstract class BaseMigrationsModel extends AbstractModel implements ModelInterfa
'version' => 'version', 'version' => 'version',
]; ];
// PHPType: int. DBType: bigint. Max Length: 9223372036854775807. // PHPType: int. DBType: bigint.
// Max Length: 9223372036854775807.
protected ?int $version = null; protected ?int $version = null;
// PHPType: string. DBType: varchar. Max Length: . // PHPType: string. DBType: varchar.
protected ?string $migration_name = null; protected ?string $migration_name = null;
// PHPType: string. DBType: timestamp. Max Length: . // PHPType: \DateTime. DBType: timestamp.
protected ?string $start_time = null; protected ?\DateTime $start_time = null;
// PHPType: string. DBType: timestamp. Max Length: . // PHPType: \DateTime. DBType: timestamp.
protected ?string $end_time = null; protected ?\DateTime $end_time = null;
// PHPType: int. DBType: tinyint. Max Length: 127. // PHPType: int. DBType: tinyint.
// Max Length: 127.
protected ?int $breakpoint = null; protected ?int $breakpoint = null;
@ -85,6 +87,7 @@ abstract class BaseMigrationsModel extends AbstractModel implements ModelInterfa
*/ */
public function getPropertyMeta(): array public function getPropertyMeta(): array
{ {
return [ return [
self::FIELD_VERSION => [ self::FIELD_VERSION => [
'type' => self::TYPE_VERSION, 'type' => self::TYPE_VERSION,
@ -111,7 +114,7 @@ abstract class BaseMigrationsModel extends AbstractModel implements ModelInterfa
} }
/** /**
* @param int $version * @param int|null $version
* *
* @return self * @return self
*/ */
@ -128,7 +131,7 @@ abstract class BaseMigrationsModel extends AbstractModel implements ModelInterfa
} }
/** /**
* @param string $migration_name * @param string|null $migration_name
* *
* @return self * @return self
*/ */
@ -139,34 +142,34 @@ abstract class BaseMigrationsModel extends AbstractModel implements ModelInterfa
return $this; return $this;
} }
public function getStart_time(): ?string public function getStart_time(): ?\DateTime
{ {
return $this->start_time; return $this->start_time;
} }
/** /**
* @param string $start_time * @param \DateTime|null $start_time
* *
* @return self * @return self
*/ */
public function setStart_time(string $start_time = null): self public function setStart_time(\DateTime $start_time = null): self
{ {
$this->start_time = $start_time; $this->start_time = $start_time;
return $this; return $this;
} }
public function getEnd_time(): ?string public function getEnd_time(): ?\DateTime
{ {
return $this->end_time; return $this->end_time;
} }
/** /**
* @param string $end_time * @param \DateTime|null $end_time
* *
* @return self * @return self
*/ */
public function setEnd_time(string $end_time = null): self public function setEnd_time(\DateTime $end_time = null): self
{ {
$this->end_time = $end_time; $this->end_time = $end_time;
@ -179,7 +182,7 @@ abstract class BaseMigrationsModel extends AbstractModel implements ModelInterfa
} }
/** /**
* @param int $breakpoint * @param int|null $breakpoint
* *
* @return self * @return self
*/ */
@ -248,33 +251,19 @@ abstract class BaseMigrationsModel extends AbstractModel implements ModelInterfa
/** /**
* Take an input array $data, and turn that array into a hydrated object. * Take an input array $data, and turn that array into a hydrated object.
* *
* This has been re-written to be as permissive as possible with loading in data. This at some point will need to
* be re-re-written as a less messy solution (ie: picking one input field style and sticking with it)
*
* @todo re-rewrite this: pick one input field style and stick with it
*
* @param array $data dehydated object array * @param array $data dehydated object array
* *
* @return Models\MigrationsModel * @return Models\MigrationsModel
*/ */
public function exchangeArray(array $data): self public function exchangeArray(array $data): self
{ {
if (isset($data['version'])) $this->setVersion($data['version']); return $this
if (isset($data['version'])) $this->setVersion($data['version']); ->setVersion($data['version'] ?? $data['Version'])
if (isset($data['Version'])) $this->setVersion($data['Version']); ->setMigration_name($data['migration_name'] ?? $data['Migration_name'])
if (isset($data['migration_name'])) $this->setMigration_name($data['migration_name']); ->setStart_time(\DateTime::createFromFormat("Y-m-d H:i:s", $data['start_time'] ?? $data['Start_time']))
if (isset($data['migration_name'])) $this->setMigration_name($data['migration_name']); ->setEnd_time(\DateTime::createFromFormat("Y-m-d H:i:s", $data['end_time'] ?? $data['End_time']))
if (isset($data['Migration_name'])) $this->setMigration_name($data['Migration_name']); ->setBreakpoint($data['breakpoint'] ?? $data['Breakpoint'])
if (isset($data['start_time'])) $this->setStart_time($data['start_time']); ;
if (isset($data['start_time'])) $this->setStart_time($data['start_time']);
if (isset($data['Start_time'])) $this->setStart_time($data['Start_time']);
if (isset($data['end_time'])) $this->setEnd_time($data['end_time']);
if (isset($data['end_time'])) $this->setEnd_time($data['end_time']);
if (isset($data['End_time'])) $this->setEnd_time($data['End_time']);
if (isset($data['breakpoint'])) $this->setBreakpoint($data['breakpoint']);
if (isset($data['breakpoint'])) $this->setBreakpoint($data['breakpoint']);
if (isset($data['Breakpoint'])) $this->setBreakpoint($data['Breakpoint']);
return $this;
} }
} }

View file

@ -48,17 +48,18 @@ abstract class BaseUsersModel extends AbstractModel implements ModelInterface
'userId' => 'userId', 'userId' => 'userId',
]; ];
// PHPType: int. DBType: int. Max Length: 2147483647. // PHPType: int. DBType: int.
// Max Length: 2147483647.
protected ?int $userId = null; protected ?int $userId = null;
// PHPType: string. DBType: varchar. Max Length: . // PHPType: string. DBType: varchar.
protected ?string $name = null; protected ?string $name = null;
// PHPType: string. DBType: varchar. Max Length: . // PHPType: string. DBType: varchar.
protected ?string $email = null; protected ?string $email = null;
// PHPType: string. DBType: timestamp. Max Length: . // PHPType: \DateTime. DBType: timestamp.
protected ?string $created = null; protected ?\DateTime $created = null;
private Services\BlogPostsService $blogPostsService; private Services\BlogPostsService $blogPostsService;
@ -99,6 +100,7 @@ abstract class BaseUsersModel extends AbstractModel implements ModelInterface
*/ */
public function getPropertyMeta(): array public function getPropertyMeta(): array
{ {
return [ return [
self::FIELD_USERID => [ self::FIELD_USERID => [
'type' => self::TYPE_USERID, 'type' => self::TYPE_USERID,
@ -123,7 +125,7 @@ abstract class BaseUsersModel extends AbstractModel implements ModelInterface
} }
/** /**
* @param int $userId * @param int|null $userId
* *
* @return self * @return self
*/ */
@ -140,7 +142,7 @@ abstract class BaseUsersModel extends AbstractModel implements ModelInterface
} }
/** /**
* @param string $name * @param string|null $name
* *
* @return self * @return self
*/ */
@ -157,7 +159,7 @@ abstract class BaseUsersModel extends AbstractModel implements ModelInterface
} }
/** /**
* @param string $email * @param string|null $email
* *
* @return self * @return self
*/ */
@ -168,17 +170,17 @@ abstract class BaseUsersModel extends AbstractModel implements ModelInterface
return $this; return $this;
} }
public function getCreated(): ?string public function getCreated(): ?\DateTime
{ {
return $this->created; return $this->created;
} }
/** /**
* @param string $created * @param \DateTime|null $created
* *
* @return self * @return self
*/ */
public function setCreated(string $created = null): self public function setCreated(\DateTime $created = null): self
{ {
$this->created = $created; $this->created = $created;
@ -323,30 +325,18 @@ abstract class BaseUsersModel extends AbstractModel implements ModelInterface
/** /**
* Take an input array $data, and turn that array into a hydrated object. * Take an input array $data, and turn that array into a hydrated object.
* *
* This has been re-written to be as permissive as possible with loading in data. This at some point will need to
* be re-re-written as a less messy solution (ie: picking one input field style and sticking with it)
*
* @todo re-rewrite this: pick one input field style and stick with it
*
* @param array $data dehydated object array * @param array $data dehydated object array
* *
* @return Models\UsersModel * @return Models\UsersModel
*/ */
public function exchangeArray(array $data): self public function exchangeArray(array $data): self
{ {
if (isset($data['userId'])) $this->setUserId($data['userId']); return $this
if (isset($data['userId'])) $this->setUserId($data['userId']); ->setUserId($data['userId'] ?? $data['UserId'])
if (isset($data['UserId'])) $this->setUserId($data['UserId']); ->setName($data['name'] ?? $data['Name'])
if (isset($data['name'])) $this->setName($data['name']); ->setEmail($data['email'] ?? $data['Email'])
if (isset($data['name'])) $this->setName($data['name']); ->setCreated(\DateTime::createFromFormat("Y-m-d H:i:s", $data['created'] ?? $data['Created']))
if (isset($data['Name'])) $this->setName($data['Name']); ;
if (isset($data['email'])) $this->setEmail($data['email']);
if (isset($data['email'])) $this->setEmail($data['email']);
if (isset($data['Email'])) $this->setEmail($data['Email']);
if (isset($data['created'])) $this->setCreated($data['created']);
if (isset($data['created'])) $this->setCreated($data['created']);
if (isset($data['Created'])) $this->setCreated($data['Created']);
return $this;
} }
} }

View file

@ -27,7 +27,6 @@ use Benzine\Exceptions\BenzineException;
abstract class BaseBlogPostsTableGateway extends AbstractTableGateway implements TableGatewayInterface abstract class BaseBlogPostsTableGateway extends AbstractTableGateway implements TableGatewayInterface
{ {
protected $table = 'BlogPosts'; protected $table = 'BlogPosts';
//protected string $database = 'default';
protected string $model = Models\BlogPostsModel::class; protected string $model = Models\BlogPostsModel::class;
protected Generator $faker; protected Generator $faker;
protected Connection\Databases $databaseConnection; protected Connection\Databases $databaseConnection;
@ -69,8 +68,8 @@ abstract class BaseBlogPostsTableGateway extends AbstractTableGateway implements
return $this->getNewModelInstance([ return $this->getNewModelInstance([
// blogPostId. Type = int. PHPType = int. Has no related objects. Default is literal null // blogPostId. Type = int. PHPType = int. Has no related objects. Default is literal null
// created. Type = timestamp. PHPType = string. Has no related objects. Default is interpreted current_timestamp() // created. Type = timestamp. PHPType = \DateTime. Has no related objects. Default is interpreted current_timestamp()
'created' => $this->faker->dateTime()->format("Y-m-d H:i:s"), // @todo: Make datetime fields accept DateTime objects instead of strings. - MB 'created' => $this->faker->word,
// description. Type = text. PHPType = string. Has no related objects. Default is literal null // description. Type = text. PHPType = string. Has no related objects. Default is literal null
'description' => substr($this->faker->text(500), 0, 500), 'description' => substr($this->faker->text(500), 0, 500),
// title. Type = varchar. PHPType = string. Has no related objects. Default is literal null // title. Type = varchar. PHPType = string. Has no related objects. Default is literal null

View file

@ -27,7 +27,6 @@ use Benzine\Exceptions\BenzineException;
abstract class BaseMigrationsTableGateway extends AbstractTableGateway implements TableGatewayInterface abstract class BaseMigrationsTableGateway extends AbstractTableGateway implements TableGatewayInterface
{ {
protected $table = 'Migrations'; protected $table = 'Migrations';
//protected string $database = 'default';
protected string $model = Models\MigrationsModel::class; protected string $model = Models\MigrationsModel::class;
protected Generator $faker; protected Generator $faker;
protected Connection\Databases $databaseConnection; protected Connection\Databases $databaseConnection;
@ -62,12 +61,12 @@ abstract class BaseMigrationsTableGateway extends AbstractTableGateway implement
return $this->getNewModelInstance([ return $this->getNewModelInstance([
// breakpoint. Type = tinyint. PHPType = int. Has no related objects. Default is literal null // breakpoint. Type = tinyint. PHPType = int. Has no related objects. Default is literal null
'breakpoint' => $this->faker->numberBetween(1, 0.01), 'breakpoint' => $this->faker->numberBetween(1, 0.01),
// end_time. Type = timestamp. PHPType = string. Has no related objects. Default is literal NULL // end_time. Type = timestamp. PHPType = \DateTime. Has no related objects. Default is literal NULL
'end_time' => $this->faker->dateTime()->format("Y-m-d H:i:s"), // @todo: Make datetime fields accept DateTime objects instead of strings. - MB 'end_time' => $this->faker->word,
// migration_name. Type = varchar. PHPType = string. Has no related objects. Default is literal NULL // migration_name. Type = varchar. PHPType = string. Has no related objects. Default is literal NULL
'migration_name' => substr($this->faker->text(100), 0, 100), 'migration_name' => substr($this->faker->text(100), 0, 100),
// start_time. Type = timestamp. PHPType = string. Has no related objects. Default is literal NULL // start_time. Type = timestamp. PHPType = \DateTime. Has no related objects. Default is literal NULL
'start_time' => $this->faker->dateTime()->format("Y-m-d H:i:s"), // @todo: Make datetime fields accept DateTime objects instead of strings. - MB 'start_time' => $this->faker->word,
// version. Type = bigint. PHPType = int. Has no related objects. Default is literal null // version. Type = bigint. PHPType = int. Has no related objects. Default is literal null
'version' => $this->faker->numberBetween(1, 0.01), 'version' => $this->faker->numberBetween(1, 0.01),
]); ]);

View file

@ -27,7 +27,6 @@ use Benzine\Exceptions\BenzineException;
abstract class BaseUsersTableGateway extends AbstractTableGateway implements TableGatewayInterface abstract class BaseUsersTableGateway extends AbstractTableGateway implements TableGatewayInterface
{ {
protected $table = 'Users'; protected $table = 'Users';
//protected string $database = 'default';
protected string $model = Models\UsersModel::class; protected string $model = Models\UsersModel::class;
protected Generator $faker; protected Generator $faker;
protected Connection\Databases $databaseConnection; protected Connection\Databases $databaseConnection;
@ -60,8 +59,8 @@ abstract class BaseUsersTableGateway extends AbstractTableGateway implements Tab
public function getNewMockModelInstance() public function getNewMockModelInstance()
{ {
return $this->getNewModelInstance([ return $this->getNewModelInstance([
// created. Type = timestamp. PHPType = string. Has no related objects. Default is interpreted current_timestamp() // created. Type = timestamp. PHPType = \DateTime. Has no related objects. Default is interpreted current_timestamp()
'created' => $this->faker->dateTime()->format("Y-m-d H:i:s"), // @todo: Make datetime fields accept DateTime objects instead of strings. - MB 'created' => $this->faker->word,
// email. Type = varchar. PHPType = string. Has no related objects. Default is literal null // email. Type = varchar. PHPType = string. Has no related objects. Default is literal null
'email' => substr($this->faker->text(320), 0, 320), 'email' => substr($this->faker->text(320), 0, 320),
// name. Type = varchar. PHPType = string. Has no related objects. Default is literal null // name. Type = varchar. PHPType = string. Has no related objects. Default is literal null

View file

@ -0,0 +1,64 @@
<?php
namespace Benzine\ORM\Tests\Test\Models;
use Benzine\ORM\Abstracts\Model;
use Benzine\ORM\Tests\App as App;
use Benzine\ORM\Tests\Models;
use Benzine\ORM\Tests\Models\UsersModel;
use Benzine\ORM\Tests\Services\UsersService;
use Benzine\ORM\Tests\TableGateways;
use Benzine\ORM\Tests\TableGateways\UsersTableGateway;
use Gone\UUID\UUID;
use Benzine\Tests\BaseTestCase;
class DateTimeFieldsTest extends BaseTestCase
{
/** @var Model[] */
private $entititesToCleanUp = [];
private UsersService $usersService;
public function setUp(): void
{
parent::setUp();
$this->usersService = \Benzine\App::DI(UsersService::class);
}
public function tearDown(): void
{
foreach($this->entititesToCleanUp as $model){
$model->destroy();
}
parent::tearDown();
}
/**
* @covers \Benzine\ORM\Abstracts\Model::__toRawArray()
* @covers \Benzine\ORM\Abstracts\Model::exchangeArray()
*/
public function testCreateWithDateTime(){
$user = new UsersModel();
$user->setName("Matthew Baggett");
$user->setEmail("matthew@baggett.me");
$dateTime = new \DateTime();
$dateTime->setDate(1990, 06,01);
$dateTime->setTime(04,00,00);
$user->setCreated($dateTime);
$saved = $user->save();
$this->entititesToCleanUp[] = $saved;
// Assert that it actually saved.
$this->assertGreaterThan(0, $saved->getUserId());
$this->assertEquals("1990-06-01 04:00:00", $saved->getCreated()->format("Y-m-d H:i:s"));
$reloaded = $this->usersService->getByField(UsersModel::FIELD_USERID, $saved->getUserId());
$this->assertEquals("1990-06-01 04:00:00", $reloaded->getCreated()->format("Y-m-d H:i:s"));
}
}

View file

@ -2,7 +2,7 @@
namespace Benzine\ORM\Tests\Test\Models\Generated; namespace Benzine\ORM\Tests\Test\Models\Generated;
use Benzine\ORM\Tests\App as App; use Benzine\ORM\Tests\Test as App;
use Benzine\ORM\Tests\Models; use Benzine\ORM\Tests\Models;
use Benzine\ORM\Tests\Models\BlogPostsModel; use Benzine\ORM\Tests\Models\BlogPostsModel;
use Benzine\ORM\Tests\TableGateways; use Benzine\ORM\Tests\TableGateways;

View file

@ -2,7 +2,7 @@
namespace Benzine\ORM\Tests\Test\Models\Generated; namespace Benzine\ORM\Tests\Test\Models\Generated;
use Benzine\ORM\Tests\App as App; use Benzine\ORM\Tests\Test as App;
use Benzine\ORM\Tests\Models; use Benzine\ORM\Tests\Models;
use Benzine\ORM\Tests\Models\MigrationsModel; use Benzine\ORM\Tests\Models\MigrationsModel;
use Benzine\ORM\Tests\TableGateways; use Benzine\ORM\Tests\TableGateways;

View file

@ -2,7 +2,7 @@
namespace Benzine\ORM\Tests\Test\Models\Generated; namespace Benzine\ORM\Tests\Test\Models\Generated;
use Benzine\ORM\Tests\App as App; use Benzine\ORM\Tests\Test as App;
use Benzine\ORM\Tests\Models; use Benzine\ORM\Tests\Models;
use Benzine\ORM\Tests\Models\UsersModel; use Benzine\ORM\Tests\Models\UsersModel;
use Benzine\ORM\Tests\TableGateways; use Benzine\ORM\Tests\TableGateways;

View file

@ -2,7 +2,7 @@
namespace Benzine\ORM\Tests\Test\Services\Generated; namespace Benzine\ORM\Tests\Test\Services\Generated;
use Benzine\ORM\Tests\App as App; use Benzine\ORM\Tests\Test as App;
use Benzine\ORM\Tests\TableGateways\BlogPostsTableGateway; use Benzine\ORM\Tests\TableGateways\BlogPostsTableGateway;
use Benzine\ORM\Tests\Services; use Benzine\ORM\Tests\Services;
use Benzine\ORM\Tests\Models\BlogPostsModel; use Benzine\ORM\Tests\Models\BlogPostsModel;

View file

@ -2,7 +2,7 @@
namespace Benzine\ORM\Tests\Test\Services\Generated; namespace Benzine\ORM\Tests\Test\Services\Generated;
use Benzine\ORM\Tests\App as App; use Benzine\ORM\Tests\Test as App;
use Benzine\ORM\Tests\TableGateways\MigrationsTableGateway; use Benzine\ORM\Tests\TableGateways\MigrationsTableGateway;
use Benzine\ORM\Tests\Services; use Benzine\ORM\Tests\Services;
use Benzine\ORM\Tests\Models\MigrationsModel; use Benzine\ORM\Tests\Models\MigrationsModel;

View file

@ -2,7 +2,7 @@
namespace Benzine\ORM\Tests\Test\Services\Generated; namespace Benzine\ORM\Tests\Test\Services\Generated;
use Benzine\ORM\Tests\App as App; use Benzine\ORM\Tests\Test as App;
use Benzine\ORM\Tests\TableGateways\UsersTableGateway; use Benzine\ORM\Tests\TableGateways\UsersTableGateway;
use Benzine\ORM\Tests\Services; use Benzine\ORM\Tests\Services;
use Benzine\ORM\Tests\Models\UsersModel; use Benzine\ORM\Tests\Models\UsersModel;