PHP code example of phpspec / phpspec-migrate
1. Go to this page and download the library: Download phpspec/phpspec-migrate 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/ */
phpspec / phpspec-migrate example snippets
describe(SomeClass::class, function () {
// ... examples
});
function someHelper() { /* ... */ } // extracted from a private/protected spec method
$repo->find(Argument::containingString('x')) // legacy
allow($repo->find(any())) // converted