Skip to content

Commit cf31932

Browse files
committed
Reformatting for linting, format and analysis with Mago
1 parent 3ca3689 commit cf31932

8 files changed

Lines changed: 805 additions & 615 deletions

‎test/unit/Metadata/Object/AbstractTableObjectTest.php‎

Lines changed: 38 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
use PhpDb\Metadata\Object\ColumnObject;
99
use PhpDb\Metadata\Object\ConstraintObject;
1010
use PhpDbTest\Metadata\Object\TestAsset\ConcreteTableObject;
11+
use PHPUnit\Framework\Attributes\Test;
1112
use PHPUnit\Framework\TestCase;
1213

1314
final class AbstractTableObjectTest extends TestCase
1415
{
15-
public function testCompleteTableObjectWithAllProperties(): void
16+
#[Test]
17+
public function completeTableObjectWithAllProperties(): void
1618
{
1719
$table = $this->createConcreteTableObject('users');
1820

@@ -31,54 +33,60 @@ public function testCompleteTableObjectWithAllProperties(): void
3133
$table->setConstraints($constraints);
3234

3335
// Verify all properties are set correctly
34-
self::assertSame('users', $table->getName());
35-
self::assertSame($columns, $table->getColumns());
36-
self::assertCount(3, $table->getColumns());
37-
self::assertSame($constraints, $table->getConstraints());
38-
self::assertCount(2, $table->getConstraints());
36+
static::assertSame('users', $table->getName());
37+
static::assertSame($columns, $table->getColumns());
38+
static::assertCount(3, $table->getColumns());
39+
static::assertSame($constraints, $table->getConstraints());
40+
static::assertCount(2, $table->getConstraints());
3941
}
4042

41-
public function testConstructorWithEmptyString(): void
43+
#[Test]
44+
public function constructorWithEmptyString(): void
4245
{
4346
$table = $this->createConcreteTableObject('');
4447

4548
// Verify empty string is converted to null
46-
self::assertNull($table->getName());
49+
static::assertNull($table->getName());
4750
}
4851

49-
public function testConstructorWithName(): void
52+
#[Test]
53+
public function constructorWithName(): void
5054
{
5155
$table = $this->createConcreteTableObject('table_name');
5256

5357
// Verify name is set correctly
54-
self::assertSame('table_name', $table->getName());
58+
static::assertSame('table_name', $table->getName());
5559
}
5660

57-
public function testConstructorWithNullName(): void
61+
#[Test]
62+
public function constructorWithNullName(): void
5863
{
5964
$table = $this->createConcreteTableObject(null);
6065

6166
// Verify null name is preserved
62-
self::assertNull($table->getName());
67+
static::assertNull($table->getName());
6368
}
6469

65-
public function testGetColumnsReturnsNullWhenNotSet(): void
70+
#[Test]
71+
public function getColumnsReturnsNullWhenNotSet(): void
6672
{
6773
$table = $this->createConcreteTableObject('table');
6874

6975
// Verify columns return null when not set
70-
self::assertNull($table->getColumns());
76+
static::assertNull($table->getColumns());
7177
}
7278

73-
public function testGetConstraintsReturnsNullWhenNotSet(): void
79+
#[Test]
80+
public function getConstraintsReturnsNullWhenNotSet(): void
7481
{
7582
$table = $this->createConcreteTableObject('table');
7683

7784
// Verify constraints return null when not set
78-
self::assertNull($table->getConstraints());
85+
static::assertNull($table->getConstraints());
7986
}
8087

81-
public function testSetColumnsAndGetColumns(): void
88+
#[Test]
89+
public function setColumnsAndGetColumns(): void
8290
{
8391
$table = $this->createConcreteTableObject('table');
8492
$columns = [
@@ -88,19 +96,21 @@ public function testSetColumnsAndGetColumns(): void
8896

8997
// Set columns and verify retrieval
9098
$table->setColumns($columns);
91-
self::assertSame($columns, $table->getColumns());
99+
static::assertSame($columns, $table->getColumns());
92100
}
93101

94-
public function testSetColumnsWithEmptyArray(): void
102+
#[Test]
103+
public function setColumnsWithEmptyArray(): void
95104
{
96105
$table = $this->createConcreteTableObject('table');
97106

98107
// Set empty columns array and verify
99108
$table->setColumns([]);
100-
self::assertSame([], $table->getColumns());
109+
static::assertSame([], $table->getColumns());
101110
}
102111

103-
public function testSetConstraintsAndGetConstraints(): void
112+
#[Test]
113+
public function setConstraintsAndGetConstraints(): void
104114
{
105115
$table = $this->createConcreteTableObject('table');
106116
$constraints = [
@@ -110,25 +120,27 @@ public function testSetConstraintsAndGetConstraints(): void
110120

111121
// Set constraints and verify retrieval
112122
$table->setConstraints($constraints);
113-
self::assertSame($constraints, $table->getConstraints());
123+
static::assertSame($constraints, $table->getConstraints());
114124
}
115125

116-
public function testSetConstraintsWithEmptyArray(): void
126+
#[Test]
127+
public function setConstraintsWithEmptyArray(): void
117128
{
118129
$table = $this->createConcreteTableObject('table');
119130

120131
// Set empty constraints array and verify
121132
$table->setConstraints([]);
122-
self::assertSame([], $table->getConstraints());
133+
static::assertSame([], $table->getConstraints());
123134
}
124135

125-
public function testSetNameAndGetName(): void
136+
#[Test]
137+
public function setNameAndGetName(): void
126138
{
127139
$table = $this->createConcreteTableObject('initial_name');
128140

129141
// Update name and verify change
130142
$table->setName('new_name');
131-
self::assertSame('new_name', $table->getName());
143+
static::assertSame('new_name', $table->getName());
132144
}
133145

134146
private function createConcreteTableObject(?string $name): AbstractTableObject

0 commit comments

Comments
 (0)