PHP code example of czukowski / phpunit-sql

1. Go to this page and download the library: Download czukowski/phpunit-sql library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

czukowski / phpunit-sql example snippets


   $this->assertEqualsSQLQueries($expected, $actual);
   

   $this->assertExecutedSQLQueries($expected);
   

   $this->loadSQLQueries($expected);
   

   $this->assertExecutedSQLQueries([
       $this->loadSQLQueries('SelectItems.sql'),
       $this->loadSQLQueries('InsertNewItems.sql'),
       $this->loadSQLQueries('DeleteOldItems.sql'),
   ]);