@@ -49,18 +49,18 @@ public function testWhereKey(): void
4949
5050 $ wheres = $ this ->builder ->getQuery ()->getWheres ();
5151
52- $ this -> assertCount (1 , $ wheres );
52+ self :: assertCount (1 , $ wheres );
5353 /** @var TwoElementsLogicExpression $expression */
5454 $ expression = $ wheres [0 ];
55- $ this -> assertInstanceOf (TwoElementsLogicExpression::class, $ expression );
55+ self :: assertInstanceOf (TwoElementsLogicExpression::class, $ expression );
5656 /** @var Identifier $first */
5757 $ first = $ expression ->getFirstElement ();
58- $ this -> assertInstanceOf (Identifier::class, $ first );
59- $ this -> assertSame ($ this ->model ->getTable ().'. ' .$ this ->model ->getKeyName (), (string ) $ first );
60- $ this -> assertSame ($ id , $ expression ->getSecondElement ());
58+ self :: assertInstanceOf (Identifier::class, $ first );
59+ self :: assertSame ($ this ->model ->getTable ().'. ' .$ this ->model ->getKeyName (), (string ) $ first );
60+ self :: assertSame ($ id , $ expression ->getSecondElement ());
6161 $ operator = $ expression ->getOperator ();
62- $ this -> assertInstanceOf (Operator::class, $ operator );
63- $ this -> assertSame ('= ' , $ operator ->getValue ());
62+ self :: assertInstanceOf (Operator::class, $ operator );
63+ self :: assertSame ('= ' , $ operator ->getValue ());
6464 }
6565
6666 public function testWhereKeyNot (): void
@@ -71,20 +71,20 @@ public function testWhereKeyNot(): void
7171
7272 $ wheres = $ this ->builder ->getQuery ()->getWheres ();
7373
74- $ this -> assertCount (1 , $ wheres );
74+ self :: assertCount (1 , $ wheres );
7575 /** @var TwoElementsLogicExpression $expression */
7676 $ expression = $ wheres [0 ];
77- $ this -> assertInstanceOf (TwoElementsLogicExpression::class, $ expression );
77+ self :: assertInstanceOf (TwoElementsLogicExpression::class, $ expression );
7878 /** @var Identifier $first */
7979 $ first = $ expression ->getFirstElement ();
80- $ this -> assertInstanceOf (Identifier::class, $ first );
81- $ this -> assertSame ($ this ->model ->getTable ().'. ' .$ this ->model ->getKeyName (), (string ) $ first );
80+ self :: assertInstanceOf (Identifier::class, $ first );
81+ self :: assertSame ($ this ->model ->getTable ().'. ' .$ this ->model ->getKeyName (), (string ) $ first );
8282 /** @var Tuple $second */
8383 $ second = $ expression ->getSecondElement ();
84- $ this -> assertSame ($ ids , $ second ->getElements ());
84+ self :: assertSame ($ ids , $ second ->getElements ());
8585 $ operator = $ expression ->getOperator ();
86- $ this -> assertInstanceOf (Operator::class, $ operator );
87- $ this -> assertSame ('NOT IN ' , $ operator ->getValue ());
86+ self :: assertInstanceOf (Operator::class, $ operator );
87+ self :: assertSame ('NOT IN ' , $ operator ->getValue ());
8888 }
8989
9090 public function testWhereSimple (): void
@@ -94,18 +94,18 @@ public function testWhereSimple(): void
9494
9595 $ wheres = $ this ->builder ->getQuery ()->getWheres ();
9696
97- $ this -> assertCount (1 , $ wheres );
97+ self :: assertCount (1 , $ wheres );
9898 /** @var TwoElementsLogicExpression $expression */
9999 $ expression = $ wheres [0 ];
100- $ this -> assertInstanceOf (TwoElementsLogicExpression::class, $ expression );
100+ self :: assertInstanceOf (TwoElementsLogicExpression::class, $ expression );
101101 /** @var Identifier $first */
102102 $ first = $ expression ->getFirstElement ();
103- $ this -> assertInstanceOf (Identifier::class, $ first );
104- $ this -> assertSame ('date_column ' , (string ) $ first );
105- $ this -> assertSame ($ date , $ expression ->getSecondElement ());
103+ self :: assertInstanceOf (Identifier::class, $ first );
104+ self :: assertSame ('date_column ' , (string ) $ first );
105+ self :: assertSame ($ date , $ expression ->getSecondElement ());
106106 $ operator = $ expression ->getOperator ();
107- $ this -> assertInstanceOf (Operator::class, $ operator );
108- $ this -> assertSame ('> ' , $ operator ->getValue ());
107+ self :: assertInstanceOf (Operator::class, $ operator );
108+ self :: assertSame ('> ' , $ operator ->getValue ());
109109 }
110110
111111 public function testWhereClosure (): void
@@ -125,7 +125,7 @@ public function testWhereClosure(): void
125125
126126 $ sql = $ this ->builder ->toSql ();
127127
128- $ this -> assertSame ('SELECT * FROM `test_table` WHERE (`id` < 10 OR `id` = 15) AND `status` = 100 ' , $ sql );
128+ self :: assertSame ('SELECT * FROM `test_table` WHERE (`id` < 10 OR `id` = 15) AND `status` = 100 ' , $ sql );
129129 }
130130
131131 public function testOrWhere (): void
@@ -136,7 +136,7 @@ public function testOrWhere(): void
136136 $ this ->builder ->orWhere ('date_column ' , '> ' , $ date );
137137
138138 $ sql = $ this ->builder ->toSql ();
139- $ this -> assertSame (
139+ self :: assertSame (
140140 'SELECT * FROM `test_table` WHERE `id` = ' .$ id .' OR `date_column` > \'' .$ date .'\'' ,
141141 $ sql
142142 );
@@ -159,9 +159,9 @@ public function testFind(): void
159159
160160 $ model = $ this ->builder ->find ($ id );
161161
162- $ this -> assertInstanceOf (EloquentModelCastingTest::class, $ model );
163- $ this -> assertSame ($ id , $ model ->id );
164- $ this -> assertSame ($ stringAttribute , $ model ->stringAttribute );
162+ self :: assertInstanceOf (EloquentModelCastingTest::class, $ model );
163+ self :: assertSame ($ id , $ model ->id );
164+ self :: assertSame ($ stringAttribute , $ model ->stringAttribute );
165165 }
166166
167167 public function testFindMany (): void
@@ -184,8 +184,8 @@ public function testFindMany(): void
184184
185185 $ models = $ this ->builder ->findMany ($ ids ->toArray ());
186186
187- $ this -> assertInstanceOf (Collection::class, $ models );
188- $ this -> assertCount ($ ids ->count (), $ models );
187+ self :: assertInstanceOf (Collection::class, $ models );
188+ self :: assertCount ($ ids ->count (), $ models );
189189 }
190190
191191 public function testFindOrFail (): void
@@ -234,18 +234,18 @@ public function testGet(): void
234234
235235 $ collection = $ this ->builder ->get ();
236236
237- $ this -> assertInstanceOf (Collection::class, $ collection );
238- $ this -> assertCount (1 , $ collection );
237+ self :: assertInstanceOf (Collection::class, $ collection );
238+ self :: assertCount (1 , $ collection );
239239
240240 $ retrievedModel = $ collection [0 ];
241- $ this -> assertSame ($ connectionResultRow ['id ' ], $ retrievedModel ->id );
242- $ this -> assertSame ((int ) $ connectionResultRow ['intAttribute ' ], $ retrievedModel ->intAttribute );
243- $ this -> assertSame ((float ) $ connectionResultRow ['floatAttribute ' ], $ retrievedModel ->floatAttribute );
244- $ this -> assertSame ((string ) $ connectionResultRow ['stringAttribute ' ], $ retrievedModel ->stringAttribute );
245- $ this -> assertTrue ($ retrievedModel ->boolAttribute );
246- $ this -> assertTrue ($ retrievedModel ->booleanAttribute );
247- $ this -> assertEquals (json_decode ($ connectionResultRow ['objectAttribute ' ]), $ retrievedModel ->objectAttribute );
248- $ this -> assertSame (json_decode ($ connectionResultRow ['arrayAttribute ' ], true ), $ retrievedModel ->arrayAttribute );
249- $ this -> assertSame ($ connectionResultRow ['arrayAttribute ' ], $ retrievedModel ->jsonAttribute );
241+ self :: assertSame ($ connectionResultRow ['id ' ], $ retrievedModel ->id );
242+ self :: assertSame ((int ) $ connectionResultRow ['intAttribute ' ], $ retrievedModel ->intAttribute );
243+ self :: assertSame ((float ) $ connectionResultRow ['floatAttribute ' ], $ retrievedModel ->floatAttribute );
244+ self :: assertSame ((string ) $ connectionResultRow ['stringAttribute ' ], $ retrievedModel ->stringAttribute );
245+ self :: assertTrue ($ retrievedModel ->boolAttribute );
246+ self :: assertTrue ($ retrievedModel ->booleanAttribute );
247+ self :: assertEquals (json_decode ($ connectionResultRow ['objectAttribute ' ]), $ retrievedModel ->objectAttribute );
248+ self :: assertSame (json_decode ($ connectionResultRow ['arrayAttribute ' ], true ), $ retrievedModel ->arrayAttribute );
249+ self :: assertSame ($ connectionResultRow ['arrayAttribute ' ], $ retrievedModel ->jsonAttribute );
250250 }
251251}
0 commit comments