11<?php
22declare (strict_types=1 );
33
4- namespace SetBased \Audit \Test \MySql \AuditCommand \AbcFramework ;
4+ namespace SetBased \Audit \Test \MySql \AuditCommand \PhpPlaisio ;
55
66use SetBased \Audit \MySql \AuditDataLayer ;
77use SetBased \Audit \Test \MySql \AuditCommand \AuditCommandTestCase ;
88use SetBased \Stratum \Middle \Helper \RowSetHelper ;
99
1010/**
11- * Tests for/with typical config for ABC Framework.
11+ * Tests for/with typical config for PhpPlaisio Framework.
1212 */
13- class AbcFrameworkTest extends AuditCommandTestCase
13+ class PhpPlaisioTest extends AuditCommandTestCase
1414{
1515 //--------------------------------------------------------------------------------------------------------------------
1616 /**
@@ -53,7 +53,7 @@ public function test01(): void
5353 // MariaDB 10.2.x uses 'current_timestamp()' older versions use 'CURRENT_TIMESTAMP'.
5454 foreach ($ rows as &$ row )
5555 {
56- if ($ row ['column_default ' ]=='CURRENT_TIMESTAMP ' )
56+ if ($ row ['column_default ' ]=== 'CURRENT_TIMESTAMP ' )
5757 {
5858 $ row ['column_default ' ] = 'current_timestamp() ' ;
5959 }
@@ -150,7 +150,7 @@ public function test02a(): void
150150 $ rows = AuditDataLayer::$ dl ->executeRows ($ sql );
151151
152152 // We expect 1 row.
153- self ::assertEquals (1 , count ( $ rows) );
153+ self ::assertCount (1 , $ rows );
154154 $ row = $ rows [0 ];
155155
156156 // Tests on fields.
@@ -175,8 +175,8 @@ public function test02a(): void
175175 public function test02b (): void
176176 {
177177 // Set session and user ID.
178- AuditDataLayer::$ dl ->executeNone ('set @abc_g_ses_id =12345 ' ); // The combination of my suitcase.
179- AuditDataLayer::$ dl ->executeNone ('set @abc_g_usr_id =7011 ' );
178+ AuditDataLayer::$ dl ->executeNone ('set @audit_ses_id =12345 ' ); // The combination of my suitcase.
179+ AuditDataLayer::$ dl ->executeNone ('set @audit_usr_id =7011 ' );
180180
181181 // Update a row into ABC_AUTH_COMPANY.
182182 $ sql = sprintf ('
@@ -198,7 +198,7 @@ public function test02b(): void
198198 $ rows = AuditDataLayer::$ dl ->executeRows ($ sql );
199199
200200 // We expect 2 rows.
201- self ::assertEquals (2 , count ( $ rows) , 'row count ' );
201+ self ::assertCount (2 , $ rows , 'row count ' );
202202
203203 // Tests on 'OLD' fields.
204204 $ row = $ rows [RowSetHelper::searchInRowSet ($ rows , 'audit_type ' , 'OLD ' )];
@@ -256,7 +256,7 @@ public function test02c(): void
256256 $ rows = AuditDataLayer::$ dl ->executeRows ($ sql );
257257
258258 // We expect 1 row.
259- self ::assertEquals (1 , count ( $ rows) );
259+ self ::assertCount (1 , $ rows );
260260 $ row = $ rows [0 ];
261261
262262 // Tests on fields.
@@ -288,7 +288,7 @@ public function test02d(): void
288288 $ rows = AuditDataLayer::$ dl ->executeRows ($ sql );
289289
290290 // We expect 4 rows: 1 insert, 2 update, and 1 delete.
291- self ::assertEquals (4 , count ( $ rows) );
291+ self ::assertCount (4 , $ rows );
292292 }
293293
294294 //--------------------------------------------------------------------------------------------------------------------
0 commit comments