PHP code example of ajthinking / pest-plugin-testables

1. Go to this page and download the library: Download ajthinking/pest-plugin-testables 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/ */

    

ajthinking / pest-plugin-testables example snippets


test('it ignores excessive substraction', function() {
    testable(Inventory::class)
        ->setCount(1)
        ->substract(10)
        ->getCount()->assertEquals(0)
        ->add(2)
        ->getCount()->assertEquals(2)
});