for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SilverStripe\VendorPlugin\Tests\Methods;
use PHPUnit\Framework\TestCase;
use SilverStripe\VendorPlugin\Library;
class LibraryTest extends TestCase
{
/**
* @dataProvider resourcesDirProvider
*/
public function testResourcesDir($expected, $projectPath)
$path = __DIR__ . '/fixtures/projects/' . $projectPath;
$lib = new Library($path, 'vendor/silverstripe/skynet');
$this->assertEquals($expected, $lib->getResourcesDir());
}
public function resourcesDirProvider()
return [
['resources', 'ss43'],
['_resources', 'ss44'],
['customised-resources-dir', 'ss44WithCustomResourcesDir']
];
public function testInvalidResourceDir()
$this->expectException(\LogicException::class);
$path = __DIR__ . '/fixtures/projects/ss44InvalidResourcesDir';
$lib->getResourcesDir();