Created
March 17, 2017 21:57
-
-
Save knyga/2ab3eea6e97b0f1d1f38c3a94ffcc357 to your computer and use it in GitHub Desktop.
StashDriverFactoryTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace WebExtractor\Test; | |
use WebExtractor\StashDriverFactory\StashDriverFactory; | |
/** | |
* Class StashDriverFactoryTest | |
* | |
* @package WebExtractor\Test\Hander | |
*/ | |
class StashDriverFactoryTest extends AbstractTestCase { | |
private $factory; | |
protected function setUp() | |
{ | |
$this->factory = StashDriverFactory::getEntity(); | |
} | |
public function testCreate() { | |
$driver = $this->factory->createDriver("FileSystem"); | |
$this->assertInstanceOf('Stash\Driver\FileSystem', $driver); | |
} | |
public function testCreateCaseSensetivity() { | |
$driver = $this->factory->createDriver("BlackHole"); | |
$this->assertInstanceOf('Stash\Driver\BlackHole', $driver); | |
$driver = $this->factory->createDriver("blackhole"); | |
$this->assertInstanceOf('Stash\Driver\BlackHole', $driver); | |
} | |
/** | |
* @expectedException WebExtractor\StashDriverFactory\Exception\DriverNotFoundException | |
*/ | |
public function testCreateDriverNotFoundException() { | |
$name = "myDriver"; | |
$this->factory->createDriver($name); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment