-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
343 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -756,6 +756,7 @@ public function testToArray(): void | |
'name' => 'user1', | ||
'address' => 'address1', | ||
'status' => 1, | ||
'bool_status' => true, | ||
'profile_id' => 1, | ||
], | ||
$customer->toArray(), | ||
|
@@ -776,6 +777,7 @@ public function testToArrayWithClosure(): void | |
'name' => 'user1', | ||
'address' => 'address1', | ||
'status' => 'active', | ||
'bool_status' => true, | ||
'profile_id' => 1, | ||
], | ||
$customer->toArray(), | ||
|
@@ -883,6 +885,7 @@ public function testGetDirtyAttributesOnNewRecord(): void | |
'name' => null, | ||
'address' => null, | ||
'status' => 0, | ||
'bool_status' => false, | ||
'profile_id' => null, | ||
], | ||
$customer->getDirtyAttributes() | ||
|
@@ -900,6 +903,7 @@ public function testGetDirtyAttributesOnNewRecord(): void | |
'email' => '[email protected]', | ||
'address' => null, | ||
'status' => 0, | ||
'bool_status' => false, | ||
'profile_id' => null, | ||
], | ||
$customer->getDirtyAttributes() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yiisoft\ActiveRecord\Tests\Driver\Mysql\Stubs; | ||
|
||
/** | ||
* Model representing type table. | ||
*/ | ||
final class Type extends \Yiisoft\ActiveRecord\Tests\Stubs\ActiveRecord\Type | ||
{ | ||
public string|null $enum_col = null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yiisoft\ActiveRecord\Tests\Driver\Oracle\Stubs; | ||
|
||
use Yiisoft\ActiveRecord\ActiveQuery; | ||
|
||
/** | ||
* Class Customer. | ||
* | ||
* @property int $id | ||
* @property string $name | ||
* @property string $email | ||
* @property string $address | ||
* @property int $status | ||
*/ | ||
final class MagicCustomer extends \Yiisoft\ActiveRecord\Tests\Stubs\MagicActiveRecord\Customer | ||
{ | ||
public function getOrdersQuery(): ActiveQuery | ||
{ | ||
return $this->hasMany(Order::class, ['customer_id' => 'id'])->orderBy('{{customer}}.[[id]]'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yiisoft\ActiveRecord\Tests\Driver\Oracle\Stubs; | ||
|
||
use Yiisoft\ActiveRecord\ActiveQuery; | ||
|
||
/** | ||
* Class Order. | ||
* | ||
* @property int $id | ||
* @property int $customer_id | ||
* @property int $created_at | ||
* @property string $total | ||
*/ | ||
final class MagicOrder extends \Yiisoft\ActiveRecord\Tests\Stubs\MagicActiveRecord\Order | ||
{ | ||
public function getCustomerQuery(): ActiveQuery | ||
{ | ||
return $this->hasOne(MagicCustomer::class, ['id' => 'customer_id']); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.