Esempio n. 1
0
 /**
  * @param string $proxiesDirectory
  *
  * @throws \ProxyManager\Exception\InvalidProxyDirectoryException
  */
 public function __construct(string $proxiesDirectory)
 {
     $this->proxiesDirectory = realpath($proxiesDirectory);
     if (false === $this->proxiesDirectory) {
         throw InvalidProxyDirectoryException::proxyDirectoryNotFound($proxiesDirectory);
     }
 }
 /**
  * @covers \ProxyManager\Exception\InvalidProxyDirectoryException::proxyDirectoryNotFound
  */
 public function testProxyDirectoryNotFound()
 {
     $exception = InvalidProxyDirectoryException::proxyDirectoryNotFound('foo/bar');
     $this->assertSame('Provided directory "foo/bar" does not exist', $exception->getMessage());
 }