Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed May 24, 2024
1 parent 3e951d0 commit a4b600e
Show file tree
Hide file tree
Showing 21 changed files with 5 additions and 103 deletions.
4 changes: 0 additions & 4 deletions tests/Stubs/ActiveRecord/Alpha.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
use Yiisoft\ActiveRecord\ActiveQueryInterface;
use Yiisoft\ActiveRecord\ActiveRecord;

/**
* @property int $id
* @property string $string_identifier
*/
final class Alpha extends ActiveRecord
{
public const TABLE_NAME = 'alpha';
Expand Down
3 changes: 0 additions & 3 deletions tests/Stubs/ActiveRecord/Animal.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

/**
* Class Animal.
*
* @property int $id
* @property string $type
*/
class Animal extends ActiveRecord
{
Expand Down
5 changes: 0 additions & 5 deletions tests/Stubs/ActiveRecord/Beta.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
use Yiisoft\ActiveRecord\ActiveQueryInterface;
use Yiisoft\ActiveRecord\ActiveRecord;

/**
* @property int $id
* @property string $alpha_string_identifier
* @property Alpha $alpha
*/
final class Beta extends ActiveRecord
{
protected int $id;
Expand Down
3 changes: 0 additions & 3 deletions tests/Stubs/ActiveRecord/BitValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

/**
* {@see https://github.com/yiisoft/yii2/issues/9006}
*
* @property int $id
* @property bool $val
*/
final class BitValues extends ActiveRecord
{
Expand Down
3 changes: 0 additions & 3 deletions tests/Stubs/ActiveRecord/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

/**
* Class Category.
*
* @property int $id
* @property string $name
*/
final class Category extends ActiveRecord
{
Expand Down
2 changes: 0 additions & 2 deletions tests/Stubs/ActiveRecord/CustomerWithAlias.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

/**
* Class Customer.
*
* @method CustomerQuery findBySql($sql, $params = []) static
*/
final class CustomerWithAlias extends ActiveRecord
{
Expand Down
13 changes: 5 additions & 8 deletions tests/Stubs/ActiveRecord/Department.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@

/**
* Class Department
*
* @property int $id
* @property string $title
*/
final class Department extends ActiveRecord
{
Expand All @@ -33,6 +30,11 @@ public function relationQuery(string $name): ActiveQueryInterface
};
}

public function getEmployees(): ActiveRecordInterface
{
return $this->relation('employees');
}

public function getEmployeesQuery(): ActiveQuery
{
return $this->hasMany(
Expand All @@ -42,9 +44,4 @@ public function getEmployeesQuery(): ActiveQuery
]
)->inverseOf('department');
}

public function getEmployees(): ActiveRecordInterface
{
return $this->relation('employees');
}
}
7 changes: 0 additions & 7 deletions tests/Stubs/ActiveRecord/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@

use Yiisoft\ActiveRecord\ActiveRecord;

/**
* @property int $id
* @property string $title
* @property string $content
* @property int $version
* @property array $properties
*/
final class Document extends ActiveRecord
{
public int $id;
Expand Down
5 changes: 0 additions & 5 deletions tests/Stubs/ActiveRecord/Dossier.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@

/**
* Class Dossier
*
* @property int $id
* @property int $department_id
* @property int $employee_id
* @property string $summary
*/
final class Dossier extends ActiveRecord
{
Expand Down
6 changes: 0 additions & 6 deletions tests/Stubs/ActiveRecord/Employee.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@

/**
* Class Employee
*
* @property int $id
* @property int $department_id
* @property string $first_name
* @property string $last_name
* @property string $fullName
*/
final class Employee extends ActiveRecord
{
Expand Down
4 changes: 0 additions & 4 deletions tests/Stubs/ActiveRecord/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@

/**
* Class Item.
*
* @property int $id
* @property string $name
* @property int $category_id
*/
final class Item extends ActiveRecord
{
Expand Down
6 changes: 0 additions & 6 deletions tests/Stubs/ActiveRecord/NullValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@

/**
* Class NullValues.
*
* @property int $id
* @property int $var1
* @property int $var2
* @property int $var3
* @property string $stringcol
*/
final class NullValues extends ActiveRecord
{
Expand Down
5 changes: 0 additions & 5 deletions tests/Stubs/ActiveRecord/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@

/**
* Class Order.
*
* @property int $id
* @property int $customer_id
* @property int $created_at
* @property float $total
*/
class Order extends ActiveRecord
{
Expand Down
5 changes: 0 additions & 5 deletions tests/Stubs/ActiveRecord/OrderItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@

/**
* Class OrderItem.
*
* @property int $order_id
* @property int $item_id
* @property int $quantity
* @property float $subtotal
*/
final class OrderItem extends ActiveRecord
{
Expand Down
5 changes: 0 additions & 5 deletions tests/Stubs/ActiveRecord/OrderItemWithNullFK.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@

/**
* Class OrderItem.
*
* @property int|null $order_id
* @property int|null $item_id
* @property int $quantity
* @property float $subtotal
*/
final class OrderItemWithNullFK extends ActiveRecord
{
Expand Down
5 changes: 0 additions & 5 deletions tests/Stubs/ActiveRecord/OrderWithNullFK.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@

/**
* Class Order.
*
* @property int $id
* @property int|null $customer_id
* @property int $created_at
* @property float $total
*/
final class OrderWithNullFK extends ActiveRecord
{
Expand Down
3 changes: 0 additions & 3 deletions tests/Stubs/ActiveRecord/Profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

/**
* Class Profile.
*
* @property int $id
* @property string $description
*/
final class Profile extends ActiveRecord
{
Expand Down
3 changes: 0 additions & 3 deletions tests/Stubs/ActiveRecord/ProfileWithConstructor.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

/**
* Class Profile.
*
* @property int $id
* @property string $description
*/
final class ProfileWithConstructor extends ActiveRecord
{
Expand Down
3 changes: 0 additions & 3 deletions tests/Stubs/ActiveRecord/TestTrigger.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

/**
* Class TestTrigger.
*
* @property int $id
* @property string $stringcol
*/
final class TestTrigger extends ActiveRecord
{
Expand Down
3 changes: 0 additions & 3 deletions tests/Stubs/ActiveRecord/TestTriggerAlert.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

/**
* Class TestTriggerAlert.
*
* @property int $id
* @property string $stringcol
*/
final class TestTriggerAlert extends ActiveRecord
{
Expand Down
15 changes: 0 additions & 15 deletions tests/Stubs/ActiveRecord/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,6 @@

/**
* Model representing type table.
*
* @property int $int_col
* @property int|null $int_col2 DEFAULT 1
* @property int|null $tinyint_col DEFAULT 1
* @property int|null $smallint_col DEFAULT 1
* @property string $char_col
* @property string|null $char_col2 DEFAULT 'something'
* @property string|null $char_col3
* @property float $float_col
* @property float|null $float_col2 DEFAULT '1.23'
* @property string|null $blob_col
* @property float|null $numeric_col DEFAULT '33.22'
* @property string $time DEFAULT '2002-01-01 00:00:00'
* @property bool $bool_col
* @property bool|null $bool_col2 DEFAULT 1
*/
class Type extends ActiveRecord
{
Expand Down

0 comments on commit a4b600e

Please sign in to comment.