1. Go to this page and download the library: Download brunty/kahlan-pdo 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/ */
use function Brunty\Kahlan\PDO\reset;
use function Brunty\Kahlan\PDO\fixture;
use function Brunty\Kahlan\PDO\db;
describe('SqliteThingRepository', function() {
beforeEach(function() {
reset(); // reset our database before each test
});
it('gets all things from the database', function() {
fixture('things'); // load fixtures inside this test
// do stuff
$stmt = db()->query('SELECT * FROM Things');
$things = $stmt->fetchAll();
// run assertions
});
});
\Brunty\Kahlan\PDO\sql('things');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.