X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fdrupal%2Fdrupal-driver%2Ftests%2FDrupal%2FTests%2FDriver%2FDrushDriverTest.php;fp=vendor%2Fdrupal%2Fdrupal-driver%2Ftests%2FDrupal%2FTests%2FDriver%2FDrushDriverTest.php;h=8322aa5149cb17fa60082eeb392e025ed00502c1;hb=1270d9129ce8f27c9b28b10518e32132c58e0aca;hp=0000000000000000000000000000000000000000;hpb=c27c0f0cdaa3f354b1fe54a56ae7e854be6e3f68;p=yaffs-website diff --git a/vendor/drupal/drupal-driver/tests/Drupal/Tests/Driver/DrushDriverTest.php b/vendor/drupal/drupal-driver/tests/Drupal/Tests/Driver/DrushDriverTest.php new file mode 100644 index 000000000..8322aa514 --- /dev/null +++ b/vendor/drupal/drupal-driver/tests/Drupal/Tests/Driver/DrushDriverTest.php @@ -0,0 +1,47 @@ +assertEquals('alias', $driver->alias, 'The drush alias was not properly set.'); + } + + /** + * Tests instantiating the driver with a prefixed alias. + */ + public function testWithAliasPrefix() { + $driver = new DrushDriver('@alias'); + $this->assertEquals('alias', $driver->alias, 'The drush alias did not remove the "@" prefix.'); + } + + /** + * Tests instantiating the driver with only the root path. + */ + public function testWithRoot() { + // Bit of a hack here to use the path to this file, but all the driver cares + // about during initialization is that the root be a directory. + $driver = new DrushDriver('', __FILE__); + $this->assertEquals(__FILE__, $driver->root); + } + + /** + * Tests instantiating the driver with missing alias and root path. + * + * @expectedException \Drupal\Driver\Exception\BootstrapException + */ + public function testWithNeither() { + new DrushDriver('', ''); + } + +}