PHP code example of eserozvataf / scabbia2-testing

1. Go to this page and download the library: Download eserozvataf/scabbia2-testing 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/ */

    

eserozvataf / scabbia2-testing example snippets


namespace MyProject\Tests;

use Scabbia\Testing\UnitTestFixture;

class MyTest extends UnitTestFixture {
    protected $parser;

    protected function setUp() {
        $this->parser = new \Scabbia\Yaml\Parser\Parser();
    }

    protected function tearDown() {
        $this->parser = null;
    }

    public function testCase1() {
        $this->assertEquals('a', 'a');
    }

    public function testCase2() {
        $this->expectException('Scabbia\\Yaml\\ParseException');

        $this->parser->parse('/&afasda:sd|_*a');
    }
}