@@ -26,26 +26,26 @@ public function baseStoreAndRetrieve(string $method): void
2626 }
2727
2828 // Search by MD5 hash must give 1 row.
29- $ this -> assertCount (1 , $ this ->kernel ->blob ->searchByMd5 (md5_file (__FILE__ )));
29+ self :: assertCount (1 , $ this ->kernel ->blob ->searchByMd5 (md5_file (__FILE__ )));
3030
3131 // Test all fields of getBlob.
3232 $ blob = $ this ->kernel ->blob ->getBlob ($ blbId );
33- $ this -> assertEquals (1 , $ blob ['blb_id ' ]);
34- $ this -> assertEquals (md5_file (__FILE__ ), strtolower ($ blob ['blb_md5 ' ]));
35- $ this -> assertEquals (filesize (__FILE__ ), $ blob ['blb_size ' ]);
36- $ this -> assertEquals (basename (__FILE__ ), $ blob ['blb_filename ' ]);
37- $ this -> assertNotEmpty ($ blob ['blb_mime_type ' ]);
38- $ this -> assertNotEmpty ($ blob ['blb_timestamp ' ]);
39- $ this -> assertSame (file_get_contents (__FILE__ ), $ blob ['blb_data ' ]);
33+ self :: assertEquals (1 , $ blob ['blb_id ' ]);
34+ self :: assertEquals (md5_file (__FILE__ ), strtolower ($ blob ['blb_md5 ' ]));
35+ self :: assertEquals (filesize (__FILE__ ), $ blob ['blb_size ' ]);
36+ self :: assertEquals (basename (__FILE__ ), $ blob ['blb_filename ' ]);
37+ self :: assertNotEmpty ($ blob ['blb_mime_type ' ]);
38+ self :: assertNotEmpty ($ blob ['blb_timestamp ' ]);
39+ self :: assertSame (file_get_contents (__FILE__ ), $ blob ['blb_data ' ]);
4040
4141 // Test all fields of getMetaData.
4242 $ meta_data = $ this ->kernel ->blob ->getMetadata ($ blbId );
43- $ this -> assertEquals (1 , $ meta_data ['blb_id ' ]);
44- $ this -> assertEquals (md5_file (__FILE__ ), strtolower ($ meta_data ['blb_md5 ' ]));
45- $ this -> assertEquals (filesize (__FILE__ ), $ meta_data ['blb_size ' ]);
46- $ this -> assertEquals (basename (__FILE__ ), $ meta_data ['blb_filename ' ]);
47- $ this -> assertNotEmpty ($ meta_data ['blb_mime_type ' ]);
48- $ this -> assertNotEmpty ($ meta_data ['blb_timestamp ' ]);
43+ self :: assertEquals (1 , $ meta_data ['blb_id ' ]);
44+ self :: assertEquals (md5_file (__FILE__ ), strtolower ($ meta_data ['blb_md5 ' ]));
45+ self :: assertEquals (filesize (__FILE__ ), $ meta_data ['blb_size ' ]);
46+ self :: assertEquals (basename (__FILE__ ), $ meta_data ['blb_filename ' ]);
47+ self :: assertNotEmpty ($ meta_data ['blb_mime_type ' ]);
48+ self :: assertNotEmpty ($ meta_data ['blb_timestamp ' ]);
4949 }
5050
5151 //--------------------------------------------------------------------------------------------------------------------
@@ -62,22 +62,22 @@ public function testCollision(): void
6262 $ blbId2 = $ this ->kernel ->blob ->putFile ($ file2 , basename ($ file2 ));
6363
6464 // We expect 2 rows in ABC_BLOB and ABC_BLOB_DATA.
65- $ this -> assertEquals ($ this ->getBlobCount (), 2 , 'ABC_BLOB ' );
66- $ this -> assertEquals ($ this ->getBlobDataCount (), 2 , 'ABC_BLOB_DATA ' );
65+ self :: assertEquals (2 , $ this ->getBlobCount (), 'ABC_BLOB ' );
66+ self :: assertEquals (2 , $ this ->getBlobDataCount (), 'ABC_BLOB_DATA ' );
6767
6868 $ blob1 = $ this ->kernel ->blob ->getBlob ($ blbId1 );
6969 $ blob2 = $ this ->kernel ->blob ->getBlob ($ blbId2 );
7070
7171 // Hashes must be equal but data not.
72- $ this -> assertSame ($ blob1 ['blb_md5 ' ], $ blob2 ['blb_md5 ' ]);
73- $ this -> assertNotSame ($ blob1 ['blb_data ' ], $ blob2 ['blb_data ' ]);
72+ self :: assertSame ($ blob1 ['blb_md5 ' ], $ blob2 ['blb_md5 ' ]);
73+ self :: assertNotSame ($ blob1 ['blb_data ' ], $ blob2 ['blb_data ' ]);
7474
7575 // Test data is retrieved correctly.
76- $ this -> assertSame (file_get_contents ($ file1 ), $ blob1 ['blb_data ' ]);
77- $ this -> assertSame (file_get_contents ($ file2 ), $ blob2 ['blb_data ' ]);
76+ self :: assertSame (file_get_contents ($ file1 ), $ blob1 ['blb_data ' ]);
77+ self :: assertSame (file_get_contents ($ file2 ), $ blob2 ['blb_data ' ]);
7878
7979 // Search by MD5 hash must give 2 rows.
80- $ this -> assertCount (2 , $ this ->kernel ->blob ->searchByMd5 ($ blob1 ['blb_md5 ' ]));
80+ self :: assertCount (2 , $ this ->kernel ->blob ->searchByMd5 ($ blob1 ['blb_md5 ' ]));
8181 }
8282
8383 //--------------------------------------------------------------------------------------------------------------------
@@ -92,8 +92,8 @@ public function testCompanySeparation(): void
9292
9393 $ this ->kernel ->blob ->putFile (__FILE__ , basename (__FILE__ ));
9494
95- $ this -> assertEquals ($ this ->getBlobCount (), 2 , 'ABC_BLOB ' );
96- $ this -> assertEquals ($ this ->getBlobDataCount (), 2 , 'ABC_BLOB_DATA ' );
95+ self :: assertEquals (2 , $ this ->getBlobCount (), 'ABC_BLOB ' );
96+ self :: assertEquals (2 , $ this ->getBlobDataCount (), 'ABC_BLOB_DATA ' );
9797 }
9898
9999 //--------------------------------------------------------------------------------------------------------------------
@@ -103,10 +103,10 @@ public function testCompanySeparation(): void
103103 public function testDelBlob (): void
104104 {
105105 $ blbId = $ this ->kernel ->blob ->putFile (__FILE__ , basename (__FILE__ ));
106- $ this -> assertEquals ($ this ->getBlobCount (), 1 , 'ABC_BLOB ' );
106+ self :: assertEquals (1 , $ this ->getBlobCount (), 'ABC_BLOB ' );
107107
108108 $ this ->kernel ->blob ->delBlob ($ blbId );
109- $ this -> assertEquals ($ this ->getBlobCount (), 0 , 'ABC_BLOB ' );
109+ self :: assertEquals (0 , $ this ->getBlobCount (), 'ABC_BLOB ' );
110110 }
111111
112112 //--------------------------------------------------------------------------------------------------------------------
@@ -119,7 +119,7 @@ public function testMimeTypeTranslationPutString(): void
119119
120120 $ blob = $ this ->kernel ->blob ->getMetadata ($ blbId );
121121
122- $ this -> assertStringStartsWith ('application/pdf ' , $ blob ['blb_mime_type ' ]);
122+ self :: assertStringStartsWith ('application/pdf ' , $ blob ['blb_mime_type ' ]);
123123 }
124124
125125 //--------------------------------------------------------------------------------------------------------------------
@@ -131,8 +131,8 @@ public function testReUsage(): void
131131 $ this ->kernel ->blob ->putFile (__FILE__ , basename (__FILE__ ));
132132 $ this ->kernel ->blob ->putFile (__FILE__ , basename (__FILE__ ));
133133
134- $ this -> assertEquals ($ this ->getBlobCount (), 2 , 'ABC_BLOB ' );
135- $ this -> assertEquals ($ this ->getBlobDataCount (), 1 , 'ABC_BLOB_DATA ' );
134+ self :: assertEquals (2 , $ this ->getBlobCount (), 'ABC_BLOB ' );
135+ self :: assertEquals (1 , $ this ->getBlobDataCount (), 'ABC_BLOB_DATA ' );
136136 }
137137
138138 //--------------------------------------------------------------------------------------------------------------------
0 commit comments