Skip to content

Commit

Permalink
Remove redundant tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Aug 27, 2024
1 parent f871987 commit 89db248
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions tests/Driver/Pgsql/ArrayableTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@

namespace Yiisoft\ActiveRecord\Tests\Driver\Pgsql;

use Yiisoft\ActiveRecord\ActiveQuery;
use Yiisoft\ActiveRecord\Tests\Stubs\ActiveRecord\Customer;
use Yiisoft\ActiveRecord\Tests\Stubs\ActiveRecord\CustomerClosureField;
use Yiisoft\ActiveRecord\Tests\Support\PgsqlHelper;
use Yiisoft\Db\Connection\ConnectionInterface;

Expand All @@ -16,46 +13,4 @@ protected function createConnection(): ConnectionInterface
{
return (new PgsqlHelper())->createConnection();
}

public function testToArray(): void
{
$this->checkFixture($this->db(), 'customer', true);

$customerQuery = new ActiveQuery(Customer::class);
$customer = $customerQuery->findOne(1);

$this->assertSame(
[
'id' => 1,
'email' => '[email protected]',
'name' => 'user1',
'address' => 'address1',
'status' => 1,
'bool_status' => true,
'profile_id' => 1,
],
$customer->toArray(),
);
}

public function testToArrayWithClosure(): void
{
$this->checkFixture($this->db(), 'customer', true);

$customerQuery = new ActiveQuery(CustomerClosureField::class);
$customer = $customerQuery->findOne(1);

$this->assertSame(
[
'id' => 1,
'email' => '[email protected]',
'name' => 'user1',
'address' => 'address1',
'status' => 'active',
'bool_status' => true,
'profile_id' => 1,
],
$customer->toArray(),
);
}
}

0 comments on commit 89db248

Please sign in to comment.