PHP code example of symbiote / silverstripe-test-assist
1. Go to this page and download the library: Download symbiote/silverstripe-test-assist 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/ */
symbiote / silverstripe-test-assist example snippets
php vendor/silverstripe/framework/cli-script.php dev/tests/module/test-assist \
flush=1 build=1 selenium_host=127.0.0.1 browser=firefox \
test_url=http://my.silverstripe.site/ test_type=SymbioteSeleniumTestCase SkipTests=symbioteseleniumtestcase \
admin_user=admin admin_pass=admin
// This is global bootstrap for autoloading
// Unit testing specific setup
class PageTest extends SapphireTest {
public function testMyMethod() {
$this->assertEquals(2, Page::MyMethod());
}
}